結果

問題 No.544 Delete 7
ユーザー tentententen
提出日時 2022-10-07 08:30:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 1,418 bytes
コンパイル時間 3,909 ms
コンパイル使用メモリ 75,208 KB
実行使用メモリ 53,140 KB
最終ジャッジ日時 2023-09-02 09:48:38
合計ジャッジ時間 11,401 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
52,340 KB
testcase_01 AC 89 ms
52,608 KB
testcase_02 AC 89 ms
52,700 KB
testcase_03 AC 79 ms
52,620 KB
testcase_04 AC 90 ms
52,480 KB
testcase_05 AC 79 ms
52,380 KB
testcase_06 AC 79 ms
52,612 KB
testcase_07 AC 81 ms
52,584 KB
testcase_08 AC 92 ms
52,348 KB
testcase_09 AC 89 ms
52,600 KB
testcase_10 AC 80 ms
52,556 KB
testcase_11 AC 90 ms
52,612 KB
testcase_12 AC 79 ms
52,888 KB
testcase_13 AC 80 ms
52,400 KB
testcase_14 AC 84 ms
52,644 KB
testcase_15 AC 83 ms
52,524 KB
testcase_16 AC 80 ms
52,628 KB
testcase_17 AC 82 ms
52,900 KB
testcase_18 AC 80 ms
52,444 KB
testcase_19 AC 90 ms
52,828 KB
testcase_20 AC 89 ms
52,612 KB
testcase_21 AC 92 ms
52,444 KB
testcase_22 AC 91 ms
52,528 KB
testcase_23 AC 92 ms
52,472 KB
testcase_24 AC 90 ms
50,404 KB
testcase_25 AC 89 ms
52,960 KB
testcase_26 AC 89 ms
52,440 KB
testcase_27 AC 79 ms
52,612 KB
testcase_28 AC 91 ms
52,352 KB
testcase_29 AC 80 ms
52,524 KB
testcase_30 AC 80 ms
52,472 KB
testcase_31 AC 88 ms
52,340 KB
testcase_32 AC 90 ms
53,100 KB
testcase_33 AC 89 ms
52,392 KB
testcase_34 AC 80 ms
52,592 KB
testcase_35 AC 89 ms
52,436 KB
testcase_36 AC 79 ms
52,428 KB
testcase_37 AC 80 ms
52,104 KB
testcase_38 AC 80 ms
52,404 KB
testcase_39 AC 80 ms
52,480 KB
testcase_40 AC 86 ms
52,716 KB
testcase_41 AC 90 ms
52,580 KB
testcase_42 AC 78 ms
52,628 KB
testcase_43 AC 79 ms
52,732 KB
testcase_44 AC 78 ms
52,356 KB
testcase_45 AC 79 ms
52,476 KB
testcase_46 AC 79 ms
52,456 KB
testcase_47 AC 90 ms
52,596 KB
testcase_48 AC 78 ms
52,396 KB
testcase_49 AC 88 ms
53,136 KB
testcase_50 AC 88 ms
53,140 KB
testcase_51 AC 80 ms
52,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner();
        char[] values = sc.next().toCharArray();
        char[] left = new char[values.length];
        char[] right = new char[values.length];
        for (int i = 0; i < values.length; i++) {
            if (values[i] == '7') {
                left[i] = '3';
                right[i] = '4';
            } else {
                left[i] = values[i];
                right[i] = '0';
            }
        }
        System.out.println(Integer.parseInt(new String(left)) + " " + Integer.parseInt(new  String(right)));
    }
}
class Scanner {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    StringTokenizer st = new StringTokenizer("");
    StringBuilder sb = new StringBuilder();
    
    public Scanner() throws Exception {
        
    }
    
    public int nextInt() throws Exception {
        return Integer.parseInt(next());
    }
    
    public long nextLong() throws Exception {
        return Long.parseLong(next());
    }
    
    public double nextDouble() throws Exception {
        return Double.parseDouble(next());
    }
    
    public String next() throws Exception {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    
}
0