SHARE
TWEET

lightoj - 1001 - Opposite Task

jakaria_hossain Jul 31st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top