結果
問題 |
No.494 yukicoder
|
ユーザー |
|
提出日時 | 2022-11-23 16:00:16 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 291 bytes |
コンパイル時間 | 11,548 ms |
コンパイル使用メモリ | 403,220 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-24 20:02:06 |
合計ジャッジ時間 | 12,410 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 |
コンパイルメッセージ
warning: unused variable: `i` --> src/main.rs:8:56 | 8 | println!("{}", base[s.iter().enumerate().filter(|&(i, &c)| c == '?').nth(0).unwrap().0]); | ^ help: if this is intentional, prefix it with an underscore: `_i` | = note: `#[warn(unused_variables)]` on by default
ソースコード
fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let s = s.trim().chars().collect::<Vec<_>>(); let base = "yukicoder".chars().collect::<Vec<_>>(); println!("{}", base[s.iter().enumerate().filter(|&(i, &c)| c == '?').nth(0).unwrap().0]); }