Advertisement
jakaria_hossain

lightoj - 1001 - Opposite Task

Jul 31st, 2019
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7.  
  8. int t;
  9. cin>>t;
  10. for(int c=1;c<=t;c++)
  11. {
  12. int x,a,b;
  13. cin>>x;
  14. a=x/2;
  15. b=a+x%2;
  16. cout<<a<< " "<<b<<endl;
  17. }
  18.  
  19.  
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement