mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-08 15:18:46 +00:00
CF1551A Polycarp and Coins
R54038623
This commit is contained in:
parent
4bbb813cfe
commit
e35acd493f
20
Luogu/problem/CF1551A/CF1551A.cpp
Normal file
20
Luogu/problem/CF1551A/CF1551A.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user