From 8005fa0ac845fe46bb9d8c54ce5ae35ad5a7ab7d Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sun, 20 Mar 2022 13:09:47 +0800 Subject: [PATCH] =?UTF-8?q?T228731=20=E3=80=8CWdoi-5=E3=80=8D=E5=A4=A9?= =?UTF-8?q?=E6=89=8D=E2=91=A8=E4=B8=8E=E5=A4=A9=E6=89=8D=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R71864295 --- Luogu/T228731/T228731.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Luogu/T228731/T228731.cpp diff --git a/Luogu/T228731/T228731.cpp b/Luogu/T228731/T228731.cpp new file mode 100644 index 00000000..95b94e23 --- /dev/null +++ b/Luogu/T228731/T228731.cpp @@ -0,0 +1,22 @@ +#include + +using std::cin; +using std::cout; +const char endl = '\n'; + +int t; +long long k, n, x; + +int main() { + std::ios::sync_with_stdio(false); + cin >> t; + while (t--) { + x = 0; + cin >> k >> n; + for (int i = 1; i <= k; i++) { + x = x * 10 + 9; + } + cout << (n % x == 0 ? "aya" : "baka") << endl; + } + return 0; +}