結果

問題 No.36 素数が嫌い!
ユーザー ぴろず
提出日時 2014-12-16 21:36:41
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 376 bytes
コンパイル時間 2,050 ms
コンパイル使用メモリ 74,464 KB
実行使用メモリ 56,568 KB
最終ジャッジ日時 2024-06-11 21:55:25
合計ジャッジ時間 7,005 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17 WA * 9
権限があれば一括ダウンロードができます

ソースコード

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