結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2018-11-25 10:19:14 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 110 ms / 5,000 ms |
コード長 | 355 bytes |
コンパイル時間 | 1,948 ms |
コンパイル使用メモリ | 165,756 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 19:41:59 |
合計ジャッジ時間 | 3,130 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); long long n; cin >> n; long long cnt = 0; for(long long i = 2; i* i <= n; i++) { while(n % i == 0) { n /= i; cnt++; } } if(n != 1) cnt++; if(cnt >= 3) cout << "YES" << endl; else cout << "NO" << endl; return 0; }