結果

問題 No.1335 1337
ユーザー ks2mks2m
提出日時 2021-01-15 21:26:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 2,726 ms
コンパイル使用メモリ 71,492 KB
実行使用メモリ 55,948 KB
最終ジャッジ日時 2023-08-17 16:02:56
合計ジャッジ時間 5,832 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,684 KB
testcase_01 AC 117 ms
55,508 KB
testcase_02 AC 116 ms
55,632 KB
testcase_03 AC 117 ms
55,420 KB
testcase_04 AC 118 ms
55,576 KB
testcase_05 AC 117 ms
55,548 KB
testcase_06 AC 126 ms
55,852 KB
testcase_07 AC 117 ms
55,808 KB
testcase_08 AC 117 ms
55,340 KB
testcase_09 AC 116 ms
55,516 KB
testcase_10 AC 117 ms
55,620 KB
testcase_11 AC 116 ms
55,616 KB
testcase_12 AC 116 ms
55,948 KB
testcase_13 AC 116 ms
55,336 KB
testcase_14 AC 114 ms
55,836 KB
testcase_15 AC 117 ms
55,496 KB
testcase_16 AC 116 ms
55,516 KB
testcase_17 AC 117 ms
55,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		char[] a = sc.next().toCharArray();
		char[] s = sc.next().toCharArray();
		sc.close();

		for (int i = 0; i < s.length; i++) {
			if ('0' <= s[i] && s[i] <= '9') {
				System.out.print(a[s[i] - '0']);
			} else {
				System.out.print(s[i]);
			}
		}
	}
}
0