結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2014-10-08 08:28:24 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 100 ms / 5,000 ms |
コード長 | 241 bytes |
コンパイル時間 | 1,359 ms |
コンパイル使用メモリ | 158,936 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 00:11:56 |
合計ジャッジ時間 | 2,546 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll N; cin >> N; int cnt=0; for(ll i=2;i*i<=N;i++) { while(N%i==0){cnt++;N/=i;} } if(N>1) cnt++; if(cnt<=2)cout<<"NO\n";else cout<<"YES\n"; return 0; }