OJ-Problems-Source/HDOJ/Multi-University Training Contest/2017/Team 7/1005_Richard.cpp
2017-08-19 17:29:23 +08:00

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;
}
}