mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:31:59 +00:00
【LGR-094】洛谷 10 月月赛 II & JROI R3 Div.2
T194086: R58995827
This commit is contained in:
parent
ae929e4eb6
commit
d5696176ac
25
Luogu/contest/52665/T194086/T194086.cpp
Normal file
25
Luogu/contest/52665/T194086/T194086.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user