結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2015-04-13 17:30:54 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 441 bytes |
コンパイル時間 | 1,943 ms |
コンパイル使用メモリ | 73,908 KB |
実行使用メモリ | 45,240 KB |
最終ジャッジ日時 | 2024-07-04 14:14:59 |
合計ジャッジ時間 | 9,257 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | AC * 1 WA * 4 RE * 2 TLE * 1 -- * 18 |
ソースコード
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner koko = new Scanner(System.in); long n = koko.nextInt(); int a=0; for(int i=2; i<n; i++){ if(n%i==0){ a=1; System.out.println("YES"); break; } } if(a==0){ System.out.println("NO"); } } }