結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
chiho_miyako
|
| 提出日時 | 2015-04-14 18:14:39 |
| 言語 | Java (openjdk 23) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 709 bytes |
| コンパイル時間 | 1,932 ms |
| コンパイル使用メモリ | 74,232 KB |
| 実行使用メモリ | 54,408 KB |
| 最終ジャッジ日時 | 2024-07-04 14:29:20 |
| 合計ジャッジ時間 | 25,453 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 9 RE * 17 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner koko = new Scanner(System.in);
int n = koko.nextInt();
int count =0;
if(n==1||n==2||n==3){
System.out.println("NO");
}else{
for(int i=2; i<n; i++){
if(n%i==0){
for(int j=2; j<i; j++){
if(i%j==0){
count++;
}
}
}
}
if(count>0){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
}
chiho_miyako