結果
問題 | No.36 素数が嫌い! |
ユーザー |
![]() |
提出日時 | 2020-03-08 15:00:40 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 107 ms / 5,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 2,197 ms |
コンパイル使用メモリ | 162,488 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 16:52:04 |
合計ジャッジ時間 | 3,694 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }