题目链接:CodeForces 1983A【Array Divisibility】
思路
按规律可得,当a[i] = i时满足题目要求。
代码
#include <functional>
#include <iostream>
#include <algorithm>
#include <queue>
#include <stdio.h>
#include <string>
#include <cstring>
#include <vector>
using namespace std;
#define ll long long
const int N = 500 + 10;
int main() {
int t;
cin >> t;
while (t--) {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << i << endl;
}
}
return 0;
}
标签:Divisibility,1983A,int,CodeForces,Array,include
From: https://www.cnblogs.com/againss/p/18305235