結果

問題 No.544 Delete 7
ユーザー tanzaku
提出日時 2017-07-14 22:51:36
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 623 bytes
コンパイル時間 3,984 ms
コンパイル使用メモリ 77,132 KB
実行使用メモリ 55,144 KB
最終ジャッジ日時 2024-10-07 23:22:02
合計ジャッジ時間 13,932 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 40 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #


import java.util.*;

public class No545 {

	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;
				int b = n - a;
				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