結果
| 問題 | No.88 次はどっちだ |
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2023-01-06 23:37:46 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 708 ms |
| コンパイル使用メモリ | 195,248 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-05-24 10:48:25 |
| 合計ジャッジ時間 | 1,914 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
warning: variable does not need to be mutable --> src/main.rs:8:6 | 8 | let mut cnt = itr.flat_map(|e| e.chars()).filter(|&c| c != '.').count(); | ----^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
ソースコード
use std::io::Read;
fn main() {
let mut s = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let s = itr.next().unwrap();
let mut cnt = itr.flat_map(|e| e.chars()).filter(|&c| c != '.').count();
match (s, cnt % 2) {
("oda", 0) => println!("oda"),
("yukiko", 1) => println!("oda"),
(_, _) => println!("yukiko"),
};
}
ixTL255