結果
問題 | No.36 素数が嫌い! |
ユーザー |
![]() |
提出日時 | 2015-05-14 00:11:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 102 ms / 5,000 ms |
コード長 | 298 bytes |
コンパイル時間 | 433 ms |
コンパイル使用メモリ | 58,196 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 00:18:24 |
合計ジャッジ時間 | 1,782 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
#include<iostream> #include<algorithm> using namespace std; #define LL long long int main(void){ LL N; int cnt = 0; cin >> N; for (LL 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; }