結果
問題 |
No.1224 I hate Sqrt Inequality
|
ユーザー |
|
提出日時 | 2020-09-11 21:45:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 398 bytes |
コンパイル時間 | 1,578 ms |
コンパイル使用メモリ | 166,004 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-11 21:19:17 |
合計ジャッジ時間 | 2,170 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef long long ll; ll gcd(ll x, ll y) { if (y == 0) return x; return gcd(y, x % y); } int main() { ll a, b; cin >> a >> b; ll g = gcd(a, b); ll c = b / g; while (c % 2 == 0) c /= 2; while (c % 5 == 0) c /= 5; if (c == 1) cout << "No\n"; else cout << "Yes\n"; }