結果

問題 No.36 素数が嫌い!
コンテスト
ユーザー なお
提出日時 2014-10-08 00:52:29
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 456 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 54,360 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-12-30 07:56:07
合計ジャッジ時間 73,773 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15 TLE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;
#define REP(i, n)           for(int(i)=0;(i)<(n);++(i))

int pdecomp(ll n){
    unsigned int e = 0;
    while(n % 2 == 0){ n /= 2, e++; }
    for(unsigned int p = 3; p*p <= n; p += 2){
        while(n % p == 0){ n /= p, e++; }
    }
    if(n != 1) e++;
    return e;
}

int main(){
    ll N;
    cin >> N;
    cout << (pdecomp(N) > 2 ?"YES":"NO") << endl;
    return 0;
}
0