結果

問題 No.36 素数が嫌い!
ユーザー Aurora
提出日時 2022-05-11 11:15:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 91 ms / 5,000 ms
コード長 297 bytes
コンパイル時間 1,733 ms
コンパイル使用メモリ 166,028 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-18 18:34:48
合計ジャッジ時間 2,480 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  long long int N;
  cin >> N;
  long long int cnt = 0;
  for(long long int i=2;i*i<=N;i++){
    while(N%i == 0){
      cnt++;
      N /= i;
    }
  }
  if(N != 1) cnt++;
  if(cnt >= 3) cout << "YES" << endl;
  else cout << "NO" << endl;
}
0