You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
500 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
int T, n;
scanf("%d", &T);
while (T--) {
scanf("%d", &n);
printf("%d\n", (n - 1) / 2 + 2);
}
/*
int n;
set<int> S;
for (n = 1; n < 100; n++) {
S.clear();
for (int i = 1; i <= n + 1; i++)
S.insert(n % i);
cout << (n - 1) / 2 + 2 << " " << S.size() << endl;
for (auto x:S)
cout << x << " ";
cout << endl;
}*/
return 0;
}