結果

問題 No.676 C0nvertPr0b1em
ユーザー tentententen
提出日時 2020-11-12 09:28:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 455 bytes
コンパイル時間 2,147 ms
コンパイル使用メモリ 71,664 KB
実行使用メモリ 55,968 KB
最終ジャッジ日時 2023-09-30 01:07:48
合計ジャッジ時間 7,395 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,712 KB
testcase_01 AC 122 ms
55,932 KB
testcase_02 AC 126 ms
55,968 KB
testcase_03 AC 125 ms
55,396 KB
testcase_04 AC 125 ms
53,712 KB
testcase_05 AC 124 ms
55,668 KB
testcase_06 AC 125 ms
55,672 KB
testcase_07 AC 125 ms
55,788 KB
testcase_08 AC 124 ms
55,740 KB
testcase_09 AC 122 ms
55,584 KB
testcase_10 AC 126 ms
55,420 KB
testcase_11 AC 126 ms
55,772 KB
testcase_12 AC 124 ms
55,752 KB
testcase_13 AC 127 ms
55,744 KB
testcase_14 AC 123 ms
55,884 KB
testcase_15 AC 129 ms
55,796 KB
testcase_16 AC 126 ms
55,676 KB
testcase_17 AC 123 ms
55,964 KB
testcase_18 AC 124 ms
55,488 KB
testcase_19 AC 119 ms
55,636 KB
testcase_20 AC 128 ms
55,492 KB
testcase_21 AC 126 ms
55,892 KB
testcase_22 AC 127 ms
55,504 KB
testcase_23 AC 123 ms
55,828 KB
testcase_24 AC 121 ms
55,720 KB
testcase_25 AC 122 ms
55,812 KB
testcase_26 AC 122 ms
55,896 KB
testcase_27 AC 121 ms
55,624 KB
testcase_28 AC 122 ms
55,688 KB
testcase_29 AC 123 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] arr = sc.next().toCharArray();
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == 'I' || arr[i] == 'l') {
                arr[i] = '1';
            } else if (arr[i] == 'O' || arr[i] == 'o') {
                arr[i] = '0';
            }
        }
        System.out.println(arr);
    }
}
0