From 2629377a1e04c9468b14b9d237db76a62fc431ac Mon Sep 17 00:00:00 2001 From: Ren Baoshuo Date: Sun, 3 Oct 2021 19:22:42 +0800 Subject: [PATCH] =?UTF-8?q?P7892=20=E3=80=8EJROI-3=E3=80=8FR.I.P.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit R59042987 --- Luogu/problem/P7892/P7892.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Luogu/problem/P7892/P7892.cpp diff --git a/Luogu/problem/P7892/P7892.cpp b/Luogu/problem/P7892/P7892.cpp new file mode 100644 index 00000000..40d357c0 --- /dev/null +++ b/Luogu/problem/P7892/P7892.cpp @@ -0,0 +1,25 @@ +#include + +using namespace std; + +int t, n, m; +bool flag; + +int main() { + cin >> t; + while (t--) { + flag = true; + cin >> n >> m; + for (int i = 1; i * i <= n; i++) { + if (n % i == 0 && (i + 1 + n / i + 1) * 2 <= m) { + cout << "Good" << endl; + flag = false; + break; + } + } + if (flag) { + cout << "Miss" << endl; + } + } + return 0; +}