結果
| 問題 |
No.2098 [Cherry Alpha *] Introduction
|
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2022-12-25 23:08:57 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 427 bytes |
| コンパイル時間 | 15,645 ms |
| コンパイル使用メモリ | 386,996 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-19 15:14:24 |
| 合計ジャッジ時間 | 13,871 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
コンパイルメッセージ
warning: unused `Result` that must be used --> src/main.rs:13:2 | 13 | io::stdin().read_line(&mut s); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this `Result` may be an `Err` variant, which should be handled = note: `#[warn(unused_must_use)]` on by default help: use `let _ = ...` to ignore the resulting value | 13 | let _ = io::stdin().read_line(&mut s); | +++++++
ソースコード
use std::io;
use std::collections::HashMap;
fn main() {
let mut list = HashMap::new();
list.insert("Zelkova and Cherry", "1st");
list.insert("BANNED CONTEST", "2nd");
list.insert("Stray Bullet", "3rd");
list.insert("Early Summer Rain", "4th");
list.insert("Do you know Cherry Contest?", "Alpha");
let mut s = String::new();
io::stdin().read_line(&mut s);
let s = s.trim();
println!("{}", list.get(&s).unwrap());
}
ixTL255