結果
問題 | No.1335 1337 |
ユーザー |
![]() |
提出日時 | 2022-12-22 22:55:32 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 532 bytes |
コンパイル時間 | 10,619 ms |
コンパイル使用メモリ | 383,312 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-18 03:37:03 |
合計ジャッジ時間 | 11,604 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 14 |
ソースコード
use std::collections::HashMap;fn main() {let mut xx = String::new();std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();let xx: Vec<Vec<char>> = xx.split_whitespace().map(|s| s.chars().collect()).collect();let map: HashMap<char, char> = ('0'..='9').enumerate().map(|(i, c)| (c, xx[0][i])).collect();let answer: String = xx[1].iter().map(|&c| if ('0'..='9').contains(&c) { map[&c] } else { c }).collect();println!("{answer}");}