結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-29 23:50:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 381 bytes |
| コンパイル時間 | 566 ms |
| コンパイル使用メモリ | 63,488 KB |
| 実行使用メモリ | 8,448 KB |
| 最終ジャッジ日時 | 2024-07-04 18:48:13 |
| 合計ジャッジ時間 | 13,052 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 25 |
ソースコード
#include<iostream>
#define ll long long
using namespace std;
ll is_prime(ll n){
ll ans = 0;
for(int i=2;i*i <= n;i++){
while(n % i == 0){
ans++;
n /= i;
}
}
if(n != 1) ans++;
return ans;
}
int main(){
ll n;
cin >> n;
if(is_prime(n) < 3) cout << "NO" << endl;
else cout << "YES" << endl;
return 0;
}