mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-09 17:18:49 +00:00
21 lines
391 B
C++
21 lines
391 B
C++
#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;
|
|
}
|