Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits\stdc++.h>
- using namespace std;
- int main()
- {
- int t;
- scanf("%d", &t);
- while(t--)
- {
- long long n;
- scanf("%lld", &n);
- if(n % 3 == 0) printf("%lld %lld\n", n/3, n/3);
- else if(n % 3 == 1) printf("%lld %lld\n", (n/3)+1, n/3);
- else if(n % 3 == 2) printf("%lld %lld\n", n/3, (n/3)+1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement