結果

問題 No.544 Delete 7
ユーザー takeya_okinotakeya_okino
提出日時 2017-07-14 22:36:56
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 1,000 ms
コード長 510 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 74,020 KB
実行使用メモリ 58,812 KB
最終ジャッジ日時 2023-08-13 22:01:31
合計ジャッジ時間 12,135 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
57,020 KB
testcase_01 AC 142 ms
56,836 KB
testcase_02 AC 141 ms
57,100 KB
testcase_03 AC 140 ms
57,184 KB
testcase_04 AC 150 ms
56,924 KB
testcase_05 AC 143 ms
57,000 KB
testcase_06 AC 140 ms
56,844 KB
testcase_07 AC 141 ms
56,964 KB
testcase_08 AC 141 ms
56,596 KB
testcase_09 AC 141 ms
56,832 KB
testcase_10 AC 141 ms
56,852 KB
testcase_11 AC 141 ms
57,160 KB
testcase_12 AC 139 ms
57,080 KB
testcase_13 AC 146 ms
56,976 KB
testcase_14 AC 146 ms
57,160 KB
testcase_15 AC 138 ms
56,548 KB
testcase_16 AC 144 ms
57,160 KB
testcase_17 AC 141 ms
56,952 KB
testcase_18 AC 144 ms
56,544 KB
testcase_19 AC 140 ms
57,020 KB
testcase_20 AC 142 ms
56,852 KB
testcase_21 AC 142 ms
57,012 KB
testcase_22 AC 143 ms
57,072 KB
testcase_23 AC 143 ms
56,612 KB
testcase_24 AC 143 ms
56,880 KB
testcase_25 AC 141 ms
56,720 KB
testcase_26 AC 139 ms
56,768 KB
testcase_27 AC 141 ms
56,828 KB
testcase_28 AC 141 ms
57,068 KB
testcase_29 AC 143 ms
56,844 KB
testcase_30 AC 145 ms
56,844 KB
testcase_31 AC 142 ms
56,520 KB
testcase_32 AC 145 ms
56,956 KB
testcase_33 AC 143 ms
57,324 KB
testcase_34 AC 143 ms
54,884 KB
testcase_35 AC 148 ms
56,780 KB
testcase_36 AC 142 ms
55,344 KB
testcase_37 AC 141 ms
56,844 KB
testcase_38 AC 145 ms
56,868 KB
testcase_39 AC 142 ms
56,904 KB
testcase_40 AC 143 ms
56,832 KB
testcase_41 AC 139 ms
58,812 KB
testcase_42 AC 142 ms
57,136 KB
testcase_43 AC 141 ms
57,160 KB
testcase_44 AC 141 ms
56,848 KB
testcase_45 AC 144 ms
56,848 KB
testcase_46 AC 144 ms
56,548 KB
testcase_47 AC 143 ms
56,960 KB
testcase_48 AC 143 ms
56,944 KB
testcase_49 AC 143 ms
56,556 KB
testcase_50 AC 144 ms
56,704 KB
testcase_51 AC 143 ms
56,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String N = sc.next();
    String a = "";
    String b = "";
    for(int i = 0; i < N.length(); i++) {
      String s = String.valueOf(N.charAt(i));
      if(s.equals("7")) {
        a += "3";
        b += "4";
      } else {
        a += s;
        b += "0";
      }
    }
    int A = Integer.parseInt(a);
    int B = Integer.parseInt(b);
    System.out.println(A + " " + B);
  }
}
0