結果

問題 No.544 Delete 7
ユーザー tanzakutanzaku
提出日時 2017-07-14 22:55:26
言語 Java21
(openjdk 21)
結果
AC  
実行時間 150 ms / 1,000 ms
コード長 695 bytes
コンパイル時間 3,296 ms
コンパイル使用メモリ 79,172 KB
実行使用メモリ 58,872 KB
最終ジャッジ日時 2023-08-13 22:07:58
合計ジャッジ時間 13,448 ms
ジャッジサーバーID
(参考情報)
judge13 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
57,116 KB
testcase_01 AC 146 ms
56,596 KB
testcase_02 AC 148 ms
56,700 KB
testcase_03 AC 146 ms
56,592 KB
testcase_04 AC 150 ms
56,912 KB
testcase_05 AC 149 ms
56,560 KB
testcase_06 AC 148 ms
56,892 KB
testcase_07 AC 149 ms
57,280 KB
testcase_08 AC 149 ms
56,876 KB
testcase_09 AC 147 ms
56,796 KB
testcase_10 AC 149 ms
56,836 KB
testcase_11 AC 148 ms
56,920 KB
testcase_12 AC 147 ms
57,168 KB
testcase_13 AC 149 ms
56,500 KB
testcase_14 AC 149 ms
57,108 KB
testcase_15 AC 148 ms
56,980 KB
testcase_16 AC 149 ms
56,980 KB
testcase_17 AC 148 ms
56,548 KB
testcase_18 AC 149 ms
56,888 KB
testcase_19 AC 148 ms
58,872 KB
testcase_20 AC 149 ms
56,940 KB
testcase_21 AC 146 ms
56,792 KB
testcase_22 AC 146 ms
56,556 KB
testcase_23 AC 147 ms
54,856 KB
testcase_24 AC 146 ms
56,988 KB
testcase_25 AC 145 ms
56,868 KB
testcase_26 AC 146 ms
57,104 KB
testcase_27 AC 146 ms
56,912 KB
testcase_28 AC 145 ms
56,816 KB
testcase_29 AC 147 ms
57,192 KB
testcase_30 AC 147 ms
56,880 KB
testcase_31 AC 149 ms
54,968 KB
testcase_32 AC 150 ms
56,948 KB
testcase_33 AC 149 ms
57,084 KB
testcase_34 AC 148 ms
56,728 KB
testcase_35 AC 149 ms
56,828 KB
testcase_36 AC 147 ms
56,780 KB
testcase_37 AC 149 ms
56,464 KB
testcase_38 AC 148 ms
56,768 KB
testcase_39 AC 147 ms
56,776 KB
testcase_40 AC 149 ms
56,808 KB
testcase_41 AC 148 ms
56,696 KB
testcase_42 AC 148 ms
58,496 KB
testcase_43 AC 148 ms
56,748 KB
testcase_44 AC 148 ms
56,796 KB
testcase_45 AC 150 ms
56,824 KB
testcase_46 AC 150 ms
57,084 KB
testcase_47 AC 149 ms
57,128 KB
testcase_48 AC 148 ms
56,996 KB
testcase_49 AC 149 ms
56,488 KB
testcase_50 AC 146 ms
56,796 KB
testcase_51 AC 150 ms
56,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.*;

public class No543 {

	public static void main(String[] args) {
		try (final Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			Random random = new Random();
			while (true) {
				int a = random.nextInt(2_000_000_001) - 1_000_000_000;
				int b = n - a;
				if (Math.abs(b) > 1_000_000_000) continue;
				if ((a+"").indexOf('7') < 0 && (b+"").indexOf('7') < 0) {
					System.out.println(a + " " + b);
					break;
				}
			}
		}
	}
	
	static long gcd(long n, long r) { return r == 0 ? n : gcd(r, n % r); }
	static long lcm(long n, long r) { return n/gcd(n,r)*r; }
	static void dump(Object... objects) { System.err.println(Arrays.deepToString(objects)); }
}
0