結果

問題 No.36 素数が嫌い!
ユーザー samplelpmas
提出日時 2017-01-30 18:42:52
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 389 bytes
コンパイル時間 2,308 ms
コンパイル使用メモリ 74,128 KB
実行使用メモリ 41,856 KB
最終ジャッジ日時 2024-12-23 23:55:39
合計ジャッジ時間 6,710 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 9 RE * 17
権限があれば一括ダウンロードができます

ソースコード

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