結果

問題 No.36 素数が嫌い!
ユーザー eri
提出日時 2015-07-24 03:08:27
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 107 ms / 5,000 ms
コード長 254 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 55,544 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-27 00:21:35
合計ジャッジ時間 1,758 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
typedef long long LL;
int main(){
	int cnt = 0;
	LL n; cin >> n;
	for (LL i = 2; i*i <= n; i++){
		while (n % i == 0){ cnt++; n /= i; }
	}
	if (n != 1) cnt++;
	cout << (cnt < 3 ? "NO" : "YES") << endl;
	return 0;
}
0