0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-09-16 20:05:26 +00:00

CF1551A Polycarp and Coins

R54038623
This commit is contained in:
Baoshuo Ren 2021-07-24 08:35:43 +08:00 committed by Baoshuo Ren
parent 4bbb813cfe
commit e35acd493f
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,20 @@
#include <bits/stdc++.h>
using namespace std;
int t, n;
int main() {
cin >> t;
while (t--) {
cin >> n;
if (n % 3 == 2) {
cout << n / 3 << ' ' << n / 3 + 1 << endl;
} else if (n % 3 == 1) {
cout << n / 3 + 1 << ' ' << n / 3 << endl;
} else {
cout << n / 3 << ' ' << n / 3 << endl;
}
}
return 0;
}