結果
| 問題 | No.1335 1337 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-15 14:58:48 |
| 言語 | Rust (1.92.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 453 bytes |
| 記録 | |
| コンパイル時間 | 25,661 ms |
| コンパイル使用メモリ | 413,792 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-15 14:59:50 |
| 合計ジャッジ時間 | 25,292 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 14 |
ソースコード
use proconio::{fastout, input, marker::Bytes};
#[fastout]
fn main() {
input! {
a: Bytes,
s: Bytes,
}
println!("{}", output(solve(a, s)))
}
fn solve(a: Vec<u8>, s: Vec<u8>) -> Vec<u8> {
s.into_iter()
.map(|x| match x.is_ascii_digit() {
true => a[(x - b'0') as usize],
false => x,
})
.collect()
}
fn output(ans: Vec<u8>) -> String {
String::from_utf8(ans).unwrap()
}