結果

問題 No.36 素数が嫌い!
ユーザー samplelpmassamplelpmas
提出日時 2017-01-30 18:50:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 392 bytes
コンパイル時間 2,255 ms
コンパイル使用メモリ 72,184 KB
実行使用メモリ 58,168 KB
最終ジャッジ日時 2023-08-25 15:17:46
合計ジャッジ時間 8,927 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 181 ms
55,864 KB
testcase_01 AC 223 ms
56,032 KB
testcase_02 AC 125 ms
56,076 KB
testcase_03 AC 126 ms
56,040 KB
testcase_04 AC 124 ms
56,060 KB
testcase_05 AC 127 ms
55,948 KB
testcase_06 AC 129 ms
55,692 KB
testcase_07 AC 133 ms
56,016 KB
testcase_08 AC 126 ms
55,956 KB
testcase_09 AC 128 ms
55,796 KB
testcase_10 AC 125 ms
56,128 KB
testcase_11 AC 165 ms
55,940 KB
testcase_12 AC 240 ms
56,072 KB
testcase_13 AC 239 ms
56,020 KB
testcase_14 WA -
testcase_15 AC 125 ms
55,932 KB
testcase_16 AC 132 ms
55,912 KB
testcase_17 AC 129 ms
56,008 KB
testcase_18 AC 127 ms
55,840 KB
testcase_19 AC 171 ms
55,756 KB
testcase_20 AC 251 ms
58,168 KB
testcase_21 AC 224 ms
55,844 KB
testcase_22 AC 223 ms
55,460 KB
testcase_23 AC 193 ms
55,728 KB
testcase_24 AC 202 ms
55,792 KB
testcase_25 AC 191 ms
55,868 KB
testcase_26 AC 204 ms
55,548 KB
testcase_27 AC 229 ms
55,860 KB
testcase_28 AC 195 ms
55,504 KB
testcase_29 AC 235 ms
55,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        long N = sc.nextLong();

        int count = 0;

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

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

        }

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

    }

}
0