結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2020-02-11 16:16:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 105 ms / 5,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 1,530 ms |
コンパイル使用メモリ | 167,480 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 08:03:27 |
合計ジャッジ時間 | 3,662 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ ll n;cin >> n; ll num=n; int k=0; for(ll i=2;i*i<=n;i++){ while(num%i==0){ num/=i; k++; } } if(num!=1){ k++; } if(k>=3){ cout << "YES" << endl; } else{ cout << "NO" << endl; } }