結果

問題 No.544 Delete 7
ユーザー mosmos_21mosmos_21
提出日時 2017-07-14 22:38:24
言語 Java21
(openjdk 21)
結果
AC  
実行時間 153 ms / 1,000 ms
コード長 553 bytes
コンパイル時間 2,419 ms
コンパイル使用メモリ 74,160 KB
実行使用メモリ 57,376 KB
最終ジャッジ日時 2023-08-13 22:03:28
合計ジャッジ時間 12,346 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
57,044 KB
testcase_01 AC 151 ms
56,984 KB
testcase_02 AC 149 ms
56,984 KB
testcase_03 AC 152 ms
56,888 KB
testcase_04 AC 151 ms
56,756 KB
testcase_05 AC 151 ms
57,096 KB
testcase_06 AC 150 ms
56,700 KB
testcase_07 AC 152 ms
56,916 KB
testcase_08 AC 149 ms
56,552 KB
testcase_09 AC 153 ms
56,712 KB
testcase_10 AC 153 ms
56,780 KB
testcase_11 AC 151 ms
57,100 KB
testcase_12 AC 153 ms
57,100 KB
testcase_13 AC 151 ms
56,724 KB
testcase_14 AC 152 ms
56,968 KB
testcase_15 AC 148 ms
57,184 KB
testcase_16 AC 151 ms
57,080 KB
testcase_17 AC 152 ms
57,184 KB
testcase_18 AC 152 ms
56,880 KB
testcase_19 AC 150 ms
57,028 KB
testcase_20 AC 148 ms
57,152 KB
testcase_21 AC 150 ms
57,028 KB
testcase_22 AC 151 ms
57,104 KB
testcase_23 AC 150 ms
57,004 KB
testcase_24 AC 152 ms
56,888 KB
testcase_25 AC 151 ms
56,876 KB
testcase_26 AC 150 ms
57,008 KB
testcase_27 AC 151 ms
57,032 KB
testcase_28 AC 150 ms
57,128 KB
testcase_29 AC 150 ms
56,668 KB
testcase_30 AC 149 ms
56,760 KB
testcase_31 AC 149 ms
57,016 KB
testcase_32 AC 149 ms
57,116 KB
testcase_33 AC 150 ms
56,576 KB
testcase_34 AC 149 ms
55,188 KB
testcase_35 AC 148 ms
56,788 KB
testcase_36 AC 150 ms
56,728 KB
testcase_37 AC 148 ms
56,756 KB
testcase_38 AC 148 ms
57,000 KB
testcase_39 AC 149 ms
57,168 KB
testcase_40 AC 150 ms
57,160 KB
testcase_41 AC 149 ms
57,280 KB
testcase_42 AC 149 ms
56,736 KB
testcase_43 AC 150 ms
57,376 KB
testcase_44 AC 150 ms
56,996 KB
testcase_45 AC 151 ms
57,052 KB
testcase_46 AC 148 ms
57,268 KB
testcase_47 AC 149 ms
56,952 KB
testcase_48 AC 150 ms
56,980 KB
testcase_49 AC 150 ms
56,896 KB
testcase_50 AC 145 ms
56,836 KB
testcase_51 AC 148 ms
57,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    Scanner in = new Scanner(System.in);

    public void solve() {
        String n = in.next();
        char[] cs = n.toCharArray();
        int b = 0;
        for(int i = 0; i < cs.length; i++){
            if(cs[cs.length - i - 1] == '7'){
                b += (int)Math.pow(10, i);
                cs[cs.length - i - 1] = '6';
            }
        }
        System.out.println(new String(cs) + " " + b);
        
    }

    public static void main(String[] args) {
        new Main().solve();
    }
}
0