結果

問題 No.36 素数が嫌い!
ユーザー machy
提出日時 2015-07-25 18:35:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 405 bytes
コンパイル時間 467 ms
コンパイル使用メモリ 54,104 KB
実行使用メモリ 8,448 KB
最終ジャッジ日時 2024-07-08 13:49:00
合計ジャッジ時間 12,779 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
typedef long long LL;

int main(){
    LL N;
    cin >> N;
    int cnt = 0;
    for(int p = 2; p*p <= N; p++){
        while(N % p == 0){
            cnt += 1;
            N /= p;
            if(cnt >= 3) break;
        }
    }
    if(N > 1) cnt += 1;
    if(cnt >= 3){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
    return 0;
}
0