結果

問題 No.36 素数が嫌い!
ユーザー samplelpmassamplelpmas
提出日時 2017-01-30 18:42:52
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 389 bytes
コンパイル時間 2,169 ms
コンパイル使用メモリ 72,200 KB
実行使用メモリ 58,524 KB
最終ジャッジ日時 2023-08-25 15:16:35
合計ジャッジ時間 7,882 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 120 ms
56,156 KB
testcase_03 AC 121 ms
56,596 KB
testcase_04 AC 122 ms
55,816 KB
testcase_05 AC 121 ms
55,472 KB
testcase_06 AC 119 ms
55,948 KB
testcase_07 AC 120 ms
56,440 KB
testcase_08 AC 121 ms
55,904 KB
testcase_09 AC 120 ms
55,752 KB
testcase_10 AC 119 ms
55,912 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 AC 122 ms
56,064 KB
testcase_16 AC 120 ms
56,184 KB
testcase_17 AC 123 ms
55,896 KB
testcase_18 AC 117 ms
55,804 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long N = sc.nextInt();
        int count = 0;

        for (int i = 2; i < Math.sqrt(N); i++) {

            if (N % i == 0) {
                count++;
            }

        }

        System.out.println(1 < count ? "YES" : "NO");

    }

}
0