結果
| 問題 | No.1224 I hate Sqrt Inequality |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-29 11:56:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 488 bytes |
| 記録 | |
| コンパイル時間 | 1,473 ms |
| コンパイル使用メモリ | 166,752 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-06 03:18:05 |
| 合計ジャッジ時間 | 3,549 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using ull = unsigned long long;
int main() {
long long A,B; cin >> A >> B;
long long count = 0;
bool fire = false;
while(true) {
count++;
long long x = A % B;
if(x == 0) {
fire = true;
break;
}
A /= B;
x *= 10ll;
A = x;
if(count >= 10000000) {
break;
}
}
if(fire) cout << "No" << endl;
else cout << "Yes" << endl;
}