mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
20 lines
320 B
C++
20 lines
320 B
C++
#include<cstdio>
|
|
#include<iostream>
|
|
#include<cstring>
|
|
#include<algorithm>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int t;
|
|
cin >> t;
|
|
while (t--) {
|
|
int a;
|
|
cin >> a;
|
|
if (a % 2 == 1)
|
|
cout << (a - 1) / 2 + 2;
|
|
else
|
|
cout << a / 2 + 1;
|
|
cout << endl;
|
|
}
|
|
} |