結果
| 問題 |
No.1224 I hate Sqrt Inequality
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-12 12:30:44 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 457 bytes |
| コンパイル時間 | 764 ms |
| コンパイル使用メモリ | 66,656 KB |
| 最終ジャッジ日時 | 2025-01-14 13:16:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
コンパイルメッセージ
main.cpp:10:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
10 | main() {
| ^~~~
ソースコード
#include <iostream>
using namespace std;
long long p10[100];
long long gcd(long long a,long long b) {
return a?gcd(b%a,a):b;
}
main() {
p10[0]=1;
for (int i=1;i<100;++i) p10[i]=p10[i-1]*10;
long long a,b;
cin>>a>>b;
long long g=gcd(a,b);
a/=g;
b/=g;
while (b%5==0) {
b/=5;
}
while (b%2==0) {
b/=2;
}
if (b!=1) {
cout<<"Yes"<<endl;
} else {
cout<<"No"<<endl;
}
}