結果

問題 No.1335 1337
ユーザー tentententen
提出日時 2021-01-18 09:29:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 3,761 ms
コンパイル使用メモリ 71,968 KB
実行使用メモリ 56,400 KB
最終ジャッジ日時 2023-08-20 16:54:18
合計ジャッジ時間 6,973 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 98 ms
55,940 KB
testcase_01 AC 99 ms
55,764 KB
testcase_02 AC 99 ms
55,952 KB
testcase_03 AC 100 ms
55,560 KB
testcase_04 AC 99 ms
56,128 KB
testcase_05 AC 99 ms
55,848 KB
testcase_06 AC 100 ms
56,000 KB
testcase_07 AC 99 ms
55,472 KB
testcase_08 AC 100 ms
55,760 KB
testcase_09 AC 100 ms
56,316 KB
testcase_10 AC 100 ms
55,836 KB
testcase_11 AC 102 ms
56,140 KB
testcase_12 AC 100 ms
56,004 KB
testcase_13 AC 98 ms
55,736 KB
testcase_14 AC 99 ms
56,400 KB
testcase_15 AC 100 ms
55,680 KB
testcase_16 AC 101 ms
55,928 KB
testcase_17 AC 99 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] trans = sc.next().toCharArray();
		StringBuilder sb = new StringBuilder();
		for (char c : sc.next().toCharArray()) {
		    if (c >= '0' && c <= '9') {
		        sb.append(trans[c - '0']);
		    } else {
		        sb.append(c);
		    }
		}
		System.out.println(sb);
	}
}
0