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