結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2014-12-08 16:22:26 |
| 言語 | Java (openjdk 23) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 1,754 ms |
| コンパイル使用メモリ | 75,060 KB |
| 実行使用メモリ | 61,216 KB |
| 最終ジャッジ日時 | 2024-06-11 18:26:14 |
| 合計ジャッジ時間 | 14,242 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 25 |
ソースコード
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long n=sc.nextLong();
if(n==1){
System.out.println("NO");
return;
}
int count=0;
for(int i=2;i*i<=n;i++){
if(n%i==0){
n/=i;
count++;
}
}
if(count>2){
System.out.println("YES");
}else
System.out.println("NO");
}
}
kou6839