結果

問題 No.36 素数が嫌い!
ユーザー eve__fuyukieve__fuyuki
提出日時 2018-03-14 01:03:24
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 416 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 55,852 KB
実行使用メモリ 10,020 KB
最終ジャッジ日時 2024-11-24 12:47:52
合計ジャッジ時間 79,459 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 AC 3 ms
9,888 KB
testcase_02 AC 2 ms
9,896 KB
testcase_03 AC 1 ms
10,016 KB
testcase_04 WA -
testcase_05 AC 1 ms
10,016 KB
testcase_06 AC 2 ms
10,016 KB
testcase_07 AC 2 ms
9,888 KB
testcase_08 AC 1 ms
10,016 KB
testcase_09 AC 1 ms
10,020 KB
testcase_10 AC 1 ms
9,888 KB
testcase_11 TLE -
testcase_12 TLE -
testcase_13 WA -
testcase_14 AC 2 ms
6,820 KB
testcase_15 AC 1 ms
6,820 KB
testcase_16 AC 1 ms
6,816 KB
testcase_17 AC 1 ms
6,816 KB
testcase_18 AC 1 ms
6,820 KB
testcase_19 TLE -
testcase_20 AC 5 ms
6,820 KB
testcase_21 TLE -
testcase_22 TLE -
testcase_23 TLE -
testcase_24 AC 17 ms
6,816 KB
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int pp(long long n,int count){
    for(int i=2;i*i<=n;i++){
        if(n%i == 0){
            while(n%i == 0){
                count++;
                n /= i;
            }
            return pp(n,count);
        }
    }
    return count;
}
int main(){
    long long N;
    cin >> N;
    if(pp(N,1) <= 2) cout << "NO" << endl;
    else cout << "YES" << endl;
    return 0;
}
0