Advertisement
sherry_ahmos

Untitled

Nov 23rd, 2022
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. typedef long long ll;
  7. #define nl endl
  8. #define cy cout << "YES\n"
  9. #define cn cout << "NO\n"
  10. #define sz s.size()
  11. #define allv v.begin(), v.end()
  12. void sherry()
  13. {
  14.     ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  15. #ifndef ONLINE_JUDGE
  16.     freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  17. #endif
  18. }
  19.  
  20. void solve()
  21. {
  22.     ll a;
  23.     cin >> a;
  24.     cout << (ceil(double( a * a ) / 2 )) << nl;
  25. }
  26. int main()
  27. {
  28.     sherry();
  29.     ll t = 1;
  30.     cin >> t;
  31.     while (t--)
  32.     {
  33.         solve();
  34.     }
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement