結果

問題 No.36 素数が嫌い!
ユーザー kano_townkano_town
提出日時 2014-12-12 14:51:04
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 3,657 ms
コンパイル使用メモリ 71,624 KB
実行使用メモリ 56,080 KB
最終ジャッジ日時 2023-09-02 14:22:29
合計ジャッジ時間 10,865 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 187 ms
55,676 KB
testcase_01 AC 224 ms
55,408 KB
testcase_02 AC 128 ms
56,080 KB
testcase_03 AC 130 ms
55,736 KB
testcase_04 AC 132 ms
55,604 KB
testcase_05 AC 134 ms
55,408 KB
testcase_06 AC 138 ms
55,880 KB
testcase_07 AC 129 ms
56,008 KB
testcase_08 AC 131 ms
55,408 KB
testcase_09 AC 133 ms
55,692 KB
testcase_10 AC 133 ms
55,704 KB
testcase_11 AC 172 ms
55,872 KB
testcase_12 AC 249 ms
55,600 KB
testcase_13 AC 257 ms
55,352 KB
testcase_14 WA -
testcase_15 AC 129 ms
55,692 KB
testcase_16 AC 131 ms
55,720 KB
testcase_17 AC 132 ms
55,908 KB
testcase_18 AC 135 ms
55,632 KB
testcase_19 AC 192 ms
55,408 KB
testcase_20 AC 253 ms
55,612 KB
testcase_21 AC 222 ms
55,668 KB
testcase_22 AC 233 ms
55,676 KB
testcase_23 AC 191 ms
55,640 KB
testcase_24 AC 194 ms
55,364 KB
testcase_25 AC 197 ms
55,680 KB
testcase_26 AC 207 ms
55,604 KB
testcase_27 AC 233 ms
55,548 KB
testcase_28 AC 202 ms
55,440 KB
testcase_29 AC 248 ms
55,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder36 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong(), cnt = 0;
		for (long i = 2; i < Math.sqrt(n); i++) if (n % i == 0) cnt++;
		if (cnt > 1) System.out.println("YES");
		else System.out.println("NO");
	}
}
0