結果
| 問題 |
No.1335 1337
|
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2023-01-17 22:30:43 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 475 bytes |
| コンパイル時間 | 14,066 ms |
| コンパイル使用メモリ | 379,248 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-03 02:17:03 |
| 合計ジャッジ時間 | 13,280 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
use std::io;
fn main() {
let mut a = String::new();
io::stdin().read_line(&mut a).ok();
let a = a.trim().chars().collect::<Vec<_>>();
let mut s = String::new();
io::stdin().read_line(&mut s).ok();
let s = s.trim().chars().collect::<Vec<_>>();
let ans =
s.iter().map(|&c| c.to_string().parse::<usize>()
.map(|i| a[i].to_string()).unwrap_or_else(|_| c.to_string()))
.collect::<Vec<_>>().join("");
println!("{}", ans);
}
ixTL255