fork download
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. ios_base::sync_with_stdio(false);
  7. cin.tie(NULL);
  8. int t; cin>>t;
  9. while(t--)
  10. {
  11. int n; cin>>n;
  12. if(n%2==0) cout<<n/2<<endl;
  13. else cout<<(n/2)+1<<endl;
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 15232KB
stdin
5
9 10 11 12 13
stdout
5
5
6
6
7