結果
| 問題 | No.1224 I hate Sqrt Inequality |
| コンテスト | |
| ユーザー |
37zigen
|
| 提出日時 | 2020-09-12 12:27:22 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 438 bytes |
| 記録 | |
| コンパイル時間 | 535 ms |
| コンパイル使用メモリ | 79,872 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-13 17:04:27 |
| 合計ジャッジ時間 | 1,382 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 7 |
コンパイルメッセージ
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;
for (int i=1;i<=18;++i) {
if ((p10[i]-1)%b==0) {
cout<<"Yes"<<endl;
exit(0);
}
}
cout<<"No"<<endl;
}
37zigen