結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-09-28 10:07:05 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 389 bytes |
| 記録 | |
| コンパイル時間 | 558 ms |
| コンパイル使用メモリ | 74,096 KB |
| 実行使用メモリ | 6,144 KB |
| 最終ジャッジ日時 | 2026-03-14 01:10:59 |
| 合計ジャッジ時間 | 1,473 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
int main(){
ll N;cin>>N;
string ans="NO";
ll cnt=0;
ll N2=N;
for(ll i=2;i*i<N;++i){
if(cnt>1){
ans="YES";
break;
}
if(N2==1) break;
if(N2%i==0){
while(1){
if(N2%i!=0) break;
N2/=i;
cnt+=1;
}
}
}
cout<<ans<<endl;
return 0;
}