結果

問題 No.544 Delete 7
ユーザー htensaihtensai
提出日時 2019-12-10 09:46:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 157 ms / 1,000 ms
コード長 557 bytes
コンパイル時間 2,220 ms
コンパイル使用メモリ 76,404 KB
実行使用メモリ 57,004 KB
最終ジャッジ日時 2023-09-06 03:12:47
合計ジャッジ時間 13,469 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 147 ms
56,712 KB
testcase_01 AC 153 ms
56,636 KB
testcase_02 AC 151 ms
56,608 KB
testcase_03 AC 154 ms
56,880 KB
testcase_04 AC 154 ms
56,732 KB
testcase_05 AC 154 ms
56,652 KB
testcase_06 AC 148 ms
56,720 KB
testcase_07 AC 149 ms
54,812 KB
testcase_08 AC 148 ms
56,800 KB
testcase_09 AC 147 ms
56,600 KB
testcase_10 AC 152 ms
56,904 KB
testcase_11 AC 151 ms
56,696 KB
testcase_12 AC 149 ms
56,760 KB
testcase_13 AC 151 ms
56,796 KB
testcase_14 AC 150 ms
56,656 KB
testcase_15 AC 150 ms
56,792 KB
testcase_16 AC 152 ms
56,816 KB
testcase_17 AC 149 ms
56,736 KB
testcase_18 AC 148 ms
56,760 KB
testcase_19 AC 152 ms
56,548 KB
testcase_20 AC 151 ms
56,620 KB
testcase_21 AC 148 ms
56,660 KB
testcase_22 AC 147 ms
56,780 KB
testcase_23 AC 151 ms
56,488 KB
testcase_24 AC 151 ms
56,524 KB
testcase_25 AC 149 ms
56,896 KB
testcase_26 AC 155 ms
56,884 KB
testcase_27 AC 150 ms
56,700 KB
testcase_28 AC 148 ms
56,688 KB
testcase_29 AC 150 ms
56,880 KB
testcase_30 AC 152 ms
56,712 KB
testcase_31 AC 157 ms
56,748 KB
testcase_32 AC 156 ms
56,488 KB
testcase_33 AC 152 ms
56,748 KB
testcase_34 AC 151 ms
56,572 KB
testcase_35 AC 151 ms
56,524 KB
testcase_36 AC 151 ms
56,676 KB
testcase_37 AC 149 ms
57,004 KB
testcase_38 AC 151 ms
56,520 KB
testcase_39 AC 149 ms
56,828 KB
testcase_40 AC 151 ms
56,708 KB
testcase_41 AC 147 ms
56,812 KB
testcase_42 AC 149 ms
56,592 KB
testcase_43 AC 146 ms
56,524 KB
testcase_44 AC 150 ms
56,492 KB
testcase_45 AC 152 ms
56,656 KB
testcase_46 AC 152 ms
56,712 KB
testcase_47 AC 152 ms
56,568 KB
testcase_48 AC 152 ms
56,600 KB
testcase_49 AC 150 ms
56,556 KB
testcase_50 AC 151 ms
56,780 KB
testcase_51 AC 153 ms
56,924 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();
        int length = arr.length;
        char[] next = new char[length];
        Arrays.fill(next, '0');
        for (int i = 0; i < length; i++) {
            if (arr[i] == '7') {
                arr[i] = '6';
                next[i] = '1';
            }
        }
        int b = Integer.parseInt(new String(next));
        System.out.println(new String(arr) + " " + b);
    }
}
0