結果
| 問題 |
No.1224 I hate Sqrt Inequality
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-12 11:55:01 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 363 bytes |
| コンパイル時間 | 12,914 ms |
| コンパイル使用メモリ | 403,420 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 11:55:33 |
| 合計ジャッジ時間 | 14,397 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let mut n: Vec<u64> = s.split_whitespace().flat_map(str::parse).collect();
let mut b = n[1];
while n[1] > 0 {
(n[0], n[1]) = (n[1], n[0] % n[1])
}
b /= n[0];
while b % 2 == 0 {
b /= 2
}
while b % 5 == 0 {
b /= 5
}
println!("{}", if b > 1 { "Yes" } else { "No" })
}