結果
| 問題 | No.1224 I hate Sqrt Inequality |
| コンテスト | |
| ユーザー |
37zigen
|
| 提出日時 | 2020-09-12 12:30:44 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 457 bytes |
| 記録 | |
| コンパイル時間 | 405 ms |
| コンパイル使用メモリ | 79,744 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-13 17:04:35 |
| 合計ジャッジ時間 | 1,247 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}
}
37zigen