結果

問題 No.192 合成数
ユーザー 練習生練習生
提出日時 2015-08-18 14:18:15
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 327 bytes
コンパイル時間 3,468 ms
コンパイル使用メモリ 75,120 KB
実行使用メモリ 53,772 KB
最終ジャッジ日時 2024-04-16 17:16:56
合計ジャッジ時間 8,502 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
41,380 KB
testcase_01 AC 135 ms
41,484 KB
testcase_02 AC 134 ms
41,156 KB
testcase_03 AC 137 ms
41,156 KB
testcase_04 AC 136 ms
41,240 KB
testcase_05 AC 134 ms
41,416 KB
testcase_06 AC 138 ms
41,376 KB
testcase_07 AC 133 ms
41,616 KB
testcase_08 AC 134 ms
41,252 KB
testcase_09 AC 135 ms
41,104 KB
testcase_10 AC 164 ms
41,292 KB
testcase_11 AC 137 ms
41,200 KB
testcase_12 AC 135 ms
41,260 KB
testcase_13 AC 135 ms
41,528 KB
testcase_14 AC 133 ms
41,536 KB
testcase_15 AC 132 ms
41,556 KB
testcase_16 AC 132 ms
41,796 KB
testcase_17 AC 120 ms
40,144 KB
testcase_18 AC 135 ms
41,544 KB
testcase_19 AC 134 ms
41,412 KB
testcase_20 AC 132 ms
41,400 KB
testcase_21 AC 131 ms
41,588 KB
testcase_22 AC 133 ms
41,740 KB
testcase_23 WA -
testcase_24 AC 135 ms
41,392 KB
testcase_25 AC 134 ms
41,124 KB
testcase_26 AC 132 ms
41,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class No192 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt() - 99;
		sc.close();
		while(true){
			// フェルマーテスト
			if((Math.pow(2, (n - 1)) % n) != 1){
				System.out.println(n);
				break;
			}else{
				n++;
			}
		}
	}
}
0