結果
| 問題 |
No.1224 I hate Sqrt Inequality
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-25 23:35:03 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 464 bytes |
| コンパイル時間 | 654 ms |
| コンパイル使用メモリ | 69,904 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 08:16:34 |
| 合計ジャッジ時間 | 1,313 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 13 |
ソースコード
#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 == 0) b /= 2;
while(b % 5 == 0) b /= 5;
cout << b << endl;
if(b == 1) cout << "No" << endl;
else cout << "Yes" << endl;
}