結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 177 ms
55,556 KB
testcase_01 AC 219 ms
56,096 KB
testcase_02 AC 125 ms
56,020 KB
testcase_03 AC 124 ms
56,016 KB
testcase_04 AC 127 ms
56,152 KB
testcase_05 AC 127 ms
55,520 KB
testcase_06 AC 126 ms
55,696 KB
testcase_07 AC 125 ms
55,816 KB
testcase_08 AC 126 ms
56,052 KB
testcase_09 AC 125 ms
56,148 KB
testcase_10 AC 124 ms
55,952 KB
testcase_11 AC 166 ms
55,556 KB
testcase_12 AC 243 ms
55,812 KB
testcase_13 AC 240 ms
56,056 KB
testcase_14 WA -
testcase_15 AC 127 ms
57,956 KB
testcase_16 AC 126 ms
55,988 KB
testcase_17 AC 126 ms
56,020 KB
testcase_18 AC 126 ms
55,708 KB
testcase_19 AC 174 ms
55,536 KB
testcase_20 AC 243 ms
55,532 KB
testcase_21 AC 210 ms
56,060 KB
testcase_22 AC 215 ms
55,976 KB
testcase_23 AC 179 ms
55,816 KB
testcase_24 AC 189 ms
55,772 KB
testcase_25 AC 185 ms
55,880 KB
testcase_26 AC 192 ms
56,216 KB
testcase_27 AC 222 ms
55,800 KB
testcase_28 AC 194 ms
56,004 KB
testcase_29 AC 233 ms
56,168 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