結果

問題 No.544 Delete 7
ユーザー yuya178yuya178
提出日時 2017-07-14 22:37:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 1,924 ms
コンパイル使用メモリ 73,928 KB
実行使用メモリ 41,032 KB
最終ジャッジ日時 2023-08-13 22:02:06
合計ジャッジ時間 12,105 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 144 ms
40,456 KB
testcase_01 AC 146 ms
40,224 KB
testcase_02 AC 144 ms
40,944 KB
testcase_03 AC 142 ms
40,916 KB
testcase_04 AC 145 ms
40,848 KB
testcase_05 AC 143 ms
40,524 KB
testcase_06 AC 141 ms
40,440 KB
testcase_07 AC 141 ms
40,324 KB
testcase_08 AC 140 ms
40,760 KB
testcase_09 AC 145 ms
40,608 KB
testcase_10 AC 145 ms
40,336 KB
testcase_11 AC 146 ms
40,444 KB
testcase_12 AC 145 ms
40,316 KB
testcase_13 AC 146 ms
40,228 KB
testcase_14 AC 144 ms
40,248 KB
testcase_15 AC 143 ms
40,696 KB
testcase_16 AC 148 ms
40,576 KB
testcase_17 AC 145 ms
40,516 KB
testcase_18 AC 143 ms
40,536 KB
testcase_19 AC 150 ms
40,468 KB
testcase_20 AC 146 ms
40,256 KB
testcase_21 AC 145 ms
40,544 KB
testcase_22 AC 146 ms
40,448 KB
testcase_23 AC 145 ms
40,548 KB
testcase_24 AC 145 ms
40,632 KB
testcase_25 AC 146 ms
40,432 KB
testcase_26 AC 145 ms
40,548 KB
testcase_27 AC 145 ms
40,580 KB
testcase_28 AC 147 ms
40,712 KB
testcase_29 AC 145 ms
40,560 KB
testcase_30 AC 146 ms
40,932 KB
testcase_31 AC 148 ms
40,464 KB
testcase_32 AC 149 ms
40,628 KB
testcase_33 AC 148 ms
40,724 KB
testcase_34 AC 146 ms
41,032 KB
testcase_35 AC 147 ms
40,556 KB
testcase_36 AC 148 ms
40,268 KB
testcase_37 AC 146 ms
40,596 KB
testcase_38 AC 147 ms
40,364 KB
testcase_39 AC 146 ms
40,536 KB
testcase_40 AC 144 ms
40,604 KB
testcase_41 AC 147 ms
40,296 KB
testcase_42 AC 142 ms
40,604 KB
testcase_43 AC 146 ms
40,756 KB
testcase_44 AC 146 ms
40,416 KB
testcase_45 AC 146 ms
40,416 KB
testcase_46 AC 147 ms
40,272 KB
testcase_47 AC 146 ms
40,284 KB
testcase_48 AC 148 ms
40,664 KB
testcase_49 AC 148 ms
40,940 KB
testcase_50 AC 148 ms
40,944 KB
testcase_51 AC 147 ms
40,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        int p = 1;
        int res=0;
        for(int i=1; i<11; i++){
            int k = N/p;
            if(k%10==7){
                res += p;
            }
            p=p*10;
        }
        System.out.println(N-res+" "+res);
	}
}

0