結果

問題 No.36 素数が嫌い!
ユーザー dnish
提出日時 2017-07-04 21:24:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 105 ms / 5,000 ms
コード長 274 bytes
コンパイル時間 1,658 ms
コンパイル使用メモリ 165,960 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 01:10:06
合計ジャッジ時間 3,023 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define p(s) cout<<(s)<<endl
typedef long long ll;
using namespace std;

int main(){
	ll N;
	cin>>N;

	int ans = 0;
	for (ll i = 2; i * i <= N; i++){
		while (N%i == 0){
			N /= i;
			ans++;
		}
	}
	if(N>1) ans++;

	p(ans>2?"YES":"NO");
	return 0;
}
0