結果
問題 | No.1224 I hate Sqrt Inequality |
ユーザー |
![]() |
提出日時 | 2020-09-11 22:00:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 414 bytes |
コンパイル時間 | 2,651 ms |
コンパイル使用メモリ | 192,072 KB |
最終ジャッジ日時 | 2025-01-14 10:27:52 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ long long a,b; cin>>a>>b; if(a%b==0){ cout<<"No"<<endl; return 0; } long long temp=gcd(a,b); b/=temp; while(b){ long long now=b; if(b%2==0){ b/=2; } if(b%5==0){ b/=5; } if(now==b){ break; } } if(b != 1){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } return 0; }