結果

問題 No.1335 1337
ユーザー xRS43BofaUEZ5gc
提出日時 2021-03-02 10:34:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 615 bytes
コンパイル時間 4,779 ms
コンパイル使用メモリ 78,316 KB
実行使用メモリ 42,012 KB
最終ジャッジ日時 2024-10-03 01:37:09
合計ジャッジ時間 6,888 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	char[] convert_rule = sc.nextLine().toCharArray();
	    	char[] str_input = sc.nextLine().toCharArray();
	    	sc.close();

	    	for (int i = 0; i < str_input.length; i ++) {
	    		if (str_input[i] >= '0' && str_input[i] <= '9') {
	    			str_input[i] = convert_rule[str_input[i] - 48];
	    		}
	    	}

	    	for (int i = 0; i < str_input.length; i ++) {
	    		System.out.print(str_input[i]);
	    	}
	    	System.out.println("");
	     }



}
0