結果
| 問題 | No.892 タピオカ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-31 16:54:05 |
| 言語 | Rust (1.92.0 + proconio + num + itertools) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 833 bytes |
| 記録 | |
| コンパイル時間 | 834 ms |
| コンパイル使用メモリ | 197,880 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-01-31 16:54:08 |
| 合計ジャッジ時間 | 2,099 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | RE * 6 |
ソースコード
fn main() {
let stdin = std::io::read_to_string(std::io::stdin()).unwrap();
let mut stdin = stdin.split_ascii_whitespace();
let balls: [(u8, u8); 3] = [
(
stdin.next().unwrap().parse().unwrap(),
stdin.next().unwrap().parse().unwrap(),
),
(
stdin.next().unwrap().parse().unwrap(),
stdin.next().unwrap().parse().unwrap(),
),
(
stdin.next().unwrap().parse().unwrap(),
stdin.next().unwrap().parse().unwrap(),
),
];
println!("{}", output(solve(balls)));
}
fn solve(balls: [(u8, u8); 3]) -> bool {
balls
.into_iter()
.fold(true, |acc, (a, _)| acc ^ (a & 1 == 1))
}
fn output(ans: bool) -> &'static str {
match ans {
true => ":-)",
false => ":-(",
}
}