0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-25 07:51:58 +00:00

【LGR-094】洛谷 10 月月赛 II & JROI R3 Div.2

T194086: R58995827
This commit is contained in:
Baoshuo Ren 2021-10-03 15:37:36 +08:00 committed by Baoshuo Ren
parent ae929e4eb6
commit d5696176ac
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,25 @@
#include <bits/stdc++.h>
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;
}