結果
問題 | No.36 素数が嫌い! |
ユーザー |
![]() |
提出日時 | 2020-05-06 21:20:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 349 bytes |
コンパイル時間 | 1,419 ms |
コンパイル使用メモリ | 166,956 KB |
実行使用メモリ | 10,144 KB |
最終ジャッジ日時 | 2024-07-03 09:07:46 |
合計ジャッジ時間 | 13,885 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 25 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int cnt = 0; for (int i = 2; i * i <= N; i++) { if (N % i == 0) { while (N % i == 0) { N /= i; cnt++; } } } if (N != 1) cnt++; cout << (cnt >= 2 ? "YES" : "NO") << endl; }