結果
問題 | No.1335 1337 |
ユーザー |
![]() |
提出日時 | 2021-01-15 21:42:02 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 446 bytes |
コンパイル時間 | 11,486 ms |
コンパイル使用メモリ | 400,516 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-26 13:46:54 |
合計ジャッジ時間 | 12,901 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
fn main() {let a = read::<String>().chars().collect::<Vec<_>>();let s = read::<String>();for ch in s.chars() {if let Some(x) = ch.to_digit(10) {print!("{}", a[x as usize]);} else {print!("{}", ch);}}println!("");}fn read<T: std::str::FromStr>() -> T {let mut s = String::new();std::io::stdin().read_line(&mut s).ok();s.trim().parse().ok().unwrap()}