結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
ku_material_ro
|
| 提出日時 | 2016-09-27 09:53:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 538 bytes |
| コンパイル時間 | 423 ms |
| コンパイル使用メモリ | 59,280 KB |
| 実行使用メモリ | 10,020 KB |
| 最終ジャッジ日時 | 2024-11-21 07:14:50 |
| 合計ジャッジ時間 | 87,801 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 TLE * 13 |
ソースコード
#include<iostream>
#include<string>
#include<math.h>
using namespace std;
int sosu(long long N){
long long A;
int J = 0;
for (long long i1 = 2; i1 < N/2; i1++){
A = (N / i1)*i1;
if (A == N){
J = 1;
break;
}
}
return J;
}
int main(){
long long n;
long long a;
int cnt = 0;
cin >> n;
a = n;
//int judge = 0;
for (long long i = 2; i < sqrt(n); i++){
while (a%i == 0){
a /= i;
cnt++;
}
}
if (sosu(a) == 0)cnt++;
if (cnt >=3){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
ku_material_ro