Saleh127

codeforces 1358A.cpp

May 26th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define pi acos(-1)
  6. int main()
  7. {
  8.  
  9. test
  10. {
  11. ll a,c,d,e,f,i,j,k,l;
  12. cin>>a>>c;
  13. d=a*c;
  14. if(d%2==0) e=d/2;
  15. else e=d/2+1;
  16. cout<<e<<endl;
  17. }
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment