From e35acd493f6f9480be03913a6cc54fb35f3a8786 Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sat, 24 Jul 2021 08:35:43 +0800 Subject: [PATCH] CF1551A Polycarp and Coins R54038623 --- Luogu/problem/CF1551A/CF1551A.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Luogu/problem/CF1551A/CF1551A.cpp diff --git a/Luogu/problem/CF1551A/CF1551A.cpp b/Luogu/problem/CF1551A/CF1551A.cpp new file mode 100644 index 00000000..ea5dd62d --- /dev/null +++ b/Luogu/problem/CF1551A/CF1551A.cpp @@ -0,0 +1,20 @@ +#include + +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; +}