結果
問題 |
No.1224 I hate Sqrt Inequality
|
ユーザー |
|
提出日時 | 2020-09-25 23:33:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 613 ms |
コンパイル使用メモリ | 68,856 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-28 08:13:19 |
合計ジャッジ時間 | 1,227 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 7 WA * 6 |
ソースコード
#include <iostream> #include <vector> #include <set> using namespace std; long long gcd(long long x, long long y){ if(x < y) swap(x, y); if(x % y == 0) return y; return gcd(y, x % y); } int main(){ unsigned long long a, b; cin >> a >> b; long long g = gcd(a, b); a /= g; b /= g; while(b % 2 == 1) b /= 2; while(b % 5 == 1) b /= 5; if(b == 1) cout << "No" << endl; else cout << "Yes" << endl; }