結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
Strorkis
|
| 提出日時 | 2020-07-17 21:31:57 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 564 bytes |
| コンパイル時間 | 13,828 ms |
| コンパイル使用メモリ | 382,684 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-29 21:53:02 |
| 合計ジャッジ時間 | 12,812 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 3 |
ソースコード
fn gcd(a: usize, b: usize) -> usize {
let r = a % b;
if r > 0 { gcd(b, r) } else { b }
}
fn main() {
let [a, b]: [usize; 2] = {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
let mut iter = buf.split_whitespace();
[
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
]
};
let c = gcd(a, b);
let d = (c as f32).sqrt() as usize;
if c == d * d {
println!("Odd");
} else {
println!("Even");
}
}
Strorkis