結果

問題 No.544 Delete 7
ユーザー hhgfhn1hhgfhn1
提出日時 2018-12-18 01:01:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 168 ms / 1,000 ms
コード長 479 bytes
コンパイル時間 7,244 ms
コンパイル使用メモリ 76,300 KB
実行使用メモリ 58,620 KB
最終ジャッジ日時 2023-10-25 23:33:29
合計ジャッジ時間 14,928 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 154 ms
58,520 KB
testcase_01 AC 155 ms
58,360 KB
testcase_02 AC 165 ms
58,500 KB
testcase_03 AC 155 ms
58,336 KB
testcase_04 AC 153 ms
58,476 KB
testcase_05 AC 164 ms
58,352 KB
testcase_06 AC 153 ms
58,512 KB
testcase_07 AC 155 ms
58,276 KB
testcase_08 AC 154 ms
58,352 KB
testcase_09 AC 154 ms
58,400 KB
testcase_10 AC 155 ms
58,516 KB
testcase_11 AC 160 ms
58,404 KB
testcase_12 AC 157 ms
58,124 KB
testcase_13 AC 156 ms
58,228 KB
testcase_14 AC 157 ms
58,356 KB
testcase_15 AC 156 ms
58,276 KB
testcase_16 AC 161 ms
58,512 KB
testcase_17 AC 157 ms
58,508 KB
testcase_18 AC 158 ms
58,476 KB
testcase_19 AC 157 ms
58,360 KB
testcase_20 AC 163 ms
58,540 KB
testcase_21 AC 160 ms
58,512 KB
testcase_22 AC 155 ms
58,456 KB
testcase_23 AC 145 ms
56,324 KB
testcase_24 AC 155 ms
58,336 KB
testcase_25 AC 157 ms
58,616 KB
testcase_26 AC 155 ms
58,340 KB
testcase_27 AC 156 ms
58,372 KB
testcase_28 AC 156 ms
58,524 KB
testcase_29 AC 158 ms
58,524 KB
testcase_30 AC 145 ms
57,920 KB
testcase_31 AC 162 ms
58,396 KB
testcase_32 AC 158 ms
58,372 KB
testcase_33 AC 159 ms
58,568 KB
testcase_34 AC 156 ms
58,544 KB
testcase_35 AC 168 ms
58,420 KB
testcase_36 AC 160 ms
58,568 KB
testcase_37 AC 159 ms
58,608 KB
testcase_38 AC 161 ms
58,436 KB
testcase_39 AC 156 ms
58,396 KB
testcase_40 AC 162 ms
58,424 KB
testcase_41 AC 162 ms
58,620 KB
testcase_42 AC 159 ms
58,392 KB
testcase_43 AC 157 ms
58,452 KB
testcase_44 AC 159 ms
58,328 KB
testcase_45 AC 159 ms
58,516 KB
testcase_46 AC 157 ms
58,580 KB
testcase_47 AC 164 ms
58,384 KB
testcase_48 AC 158 ms
58,396 KB
testcase_49 AC 158 ms
58,352 KB
testcase_50 AC 165 ms
58,616 KB
testcase_51 AC 160 ms
58,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	@SuppressWarnings("resource")
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int n=scanner.nextInt();
		String s=String.valueOf(n);
		String a="";
		String b="";
		for(int i=0;i<s.length();i++) {
			char c=s.charAt(i);
			if(c=='7') {
				a+="6";
				b+="1";
			}else {
				a+=String.valueOf(c);
				b+="0";
			}
		}
		System.out.println(Integer.parseInt(a)+" "+Integer.parseInt(b));
	}
}
0