結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
oba
|
| 提出日時 | 2015-01-24 02:06:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 5,000 ms |
| コード長 | 368 bytes |
| コンパイル時間 | 730 ms |
| コンパイル使用メモリ | 57,048 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 00:14:44 |
| 合計ジャッジ時間 | 1,820 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#define REP(a,b,c) for(int a=b; a<(int)c; a++)
using namespace std;
int main(){
long long int N;
cin >> N;
int cnt = 0;
for(long long int i=2; i*i<=N; i++){
while(N%i == 0){
cnt++;
N /= i;
}
}
if(N>1) cnt++;
string ans = (cnt>=3) ? "YES\n" : "NO\n";
cout << ans;
return 0;
}
oba