結果

問題 No.544 Delete 7
ユーザー uafr_csuafr_cs
提出日時 2017-10-29 22:50:36
言語 Java21
(openjdk 21)
結果
AC  
実行時間 146 ms / 1,000 ms
コード長 801 bytes
コンパイル時間 3,085 ms
コンパイル使用メモリ 93,008 KB
実行使用メモリ 57,300 KB
最終ジャッジ日時 2023-08-13 22:36:52
合計ジャッジ時間 13,550 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
56,900 KB
testcase_01 AC 142 ms
56,956 KB
testcase_02 AC 143 ms
56,856 KB
testcase_03 AC 142 ms
56,984 KB
testcase_04 AC 143 ms
57,112 KB
testcase_05 AC 143 ms
56,916 KB
testcase_06 AC 145 ms
56,864 KB
testcase_07 AC 143 ms
56,948 KB
testcase_08 AC 143 ms
56,692 KB
testcase_09 AC 143 ms
56,868 KB
testcase_10 AC 142 ms
56,888 KB
testcase_11 AC 140 ms
56,960 KB
testcase_12 AC 141 ms
56,852 KB
testcase_13 AC 142 ms
56,808 KB
testcase_14 AC 141 ms
56,948 KB
testcase_15 AC 142 ms
56,868 KB
testcase_16 AC 141 ms
56,880 KB
testcase_17 AC 141 ms
56,696 KB
testcase_18 AC 142 ms
56,648 KB
testcase_19 AC 141 ms
54,808 KB
testcase_20 AC 141 ms
56,928 KB
testcase_21 AC 142 ms
56,880 KB
testcase_22 AC 144 ms
56,944 KB
testcase_23 AC 143 ms
56,916 KB
testcase_24 AC 144 ms
56,816 KB
testcase_25 AC 144 ms
56,880 KB
testcase_26 AC 145 ms
56,984 KB
testcase_27 AC 145 ms
56,912 KB
testcase_28 AC 145 ms
57,024 KB
testcase_29 AC 144 ms
57,104 KB
testcase_30 AC 146 ms
56,616 KB
testcase_31 AC 142 ms
56,812 KB
testcase_32 AC 142 ms
57,044 KB
testcase_33 AC 142 ms
56,848 KB
testcase_34 AC 142 ms
56,920 KB
testcase_35 AC 144 ms
56,868 KB
testcase_36 AC 145 ms
56,612 KB
testcase_37 AC 143 ms
56,844 KB
testcase_38 AC 141 ms
56,848 KB
testcase_39 AC 141 ms
56,876 KB
testcase_40 AC 141 ms
56,924 KB
testcase_41 AC 142 ms
57,300 KB
testcase_42 AC 142 ms
56,848 KB
testcase_43 AC 142 ms
56,900 KB
testcase_44 AC 142 ms
56,956 KB
testcase_45 AC 142 ms
56,860 KB
testcase_46 AC 141 ms
56,904 KB
testcase_47 AC 142 ms
56,828 KB
testcase_48 AC 141 ms
56,652 KB
testcase_49 AC 145 ms
56,988 KB
testcase_50 AC 141 ms
56,604 KB
testcase_51 AC 141 ms
57,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;
import java.util.TreeSet;

public class Main {
	
	public static long MOD = 1000000007;
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		char[] chs = sc.next().toCharArray();
		char[] fst = new char[chs.length];
		char[] snd = new char[chs.length];
		
		for(int i = 0; i < chs.length; i++){
			if(chs[i] != '7'){
				fst[i] = chs[i];
				snd[i] = '0';
			}else{
				fst[i] = (char)(chs[i] - 1);
				snd[i] = '1';
			}
		}
		
		final int fst_num = Integer.parseInt(new StringBuilder().append(fst).toString());
		final int snd_num = Integer.parseInt(new StringBuilder().append(snd).toString());
		
		
		System.out.println(fst_num + " " + snd_num);
			
	}
}
0