結果

問題 No.36 素数が嫌い!
ユーザー ぴろずぴろず
提出日時 2014-12-16 21:36:41
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 2,219 ms
コンパイル使用メモリ 71,628 KB
実行使用メモリ 57,748 KB
最終ジャッジ日時 2023-09-02 15:21:07
合計ジャッジ時間 7,769 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
39,568 KB
testcase_01 AC 113 ms
39,524 KB
testcase_02 AC 116 ms
39,488 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 126 ms
39,664 KB
testcase_08 AC 110 ms
39,592 KB
testcase_09 AC 114 ms
39,932 KB
testcase_10 AC 110 ms
39,636 KB
testcase_11 AC 121 ms
40,040 KB
testcase_12 AC 124 ms
39,488 KB
testcase_13 WA -
testcase_14 AC 114 ms
39,308 KB
testcase_15 AC 111 ms
39,396 KB
testcase_16 AC 111 ms
39,112 KB
testcase_17 AC 114 ms
39,856 KB
testcase_18 AC 113 ms
39,016 KB
testcase_19 AC 112 ms
39,184 KB
testcase_20 AC 111 ms
40,216 KB
testcase_21 AC 112 ms
38,944 KB
testcase_22 AC 118 ms
39,576 KB
testcase_23 AC 114 ms
39,712 KB
testcase_24 AC 116 ms
39,336 KB
testcase_25 AC 116 ms
39,448 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

package no036;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		BigInteger bi = new BigInteger(sc.next());
		if (bi.intValue() == 1) {
			System.out.println("NO");
			return;
		}
		System.out.println(bi.isProbablePrime(30) ? "NO" : "YES");
	}

}
0