結果

問題 No.36 素数が嫌い!
ユーザー monnu
提出日時 2020-05-31 20:57:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 406 bytes
コンパイル時間 1,816 ms
コンパイル使用メモリ 167,436 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-18 14:44:56
合計ジャッジ時間 3,743 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using Graph=vector<vector<int>>;
#define MOD 998244353
#define INF 1000000000

int main(){
  ll N;
  cin>>N;
  ll n=N;
  int count=0;
  ll i=2;
  while(i*i<=n){
    if(N%i==0){
      N/=i;
      count++;
    }else{
      i++;
    }
  }
  if(N>1){
    count++;
  }

  if(count>2){
    cout<<"YES"<<endl;
  }else{
    cout<<"NO"<<endl;
  }
}
0