結果

問題 No.1335 1337
ユーザー ks2m
提出日時 2021-01-15 21:26:55
言語 Java
(openjdk 23)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 2,176 ms
コンパイル使用メモリ 75,180 KB
実行使用メモリ 41,076 KB
最終ジャッジ日時 2024-11-26 13:17:06
合計ジャッジ時間 4,784 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

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