結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2015-05-29 01:26:46 |
| 言語 | C++11(old_compat) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 5,000 ms |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 1,230 ms |
| コンパイル使用メモリ | 167,764 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 16:02:32 |
| 合計ジャッジ時間 | 2,109 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <vector>
using namespace std;
typedef long long LL;
int main(int argc, char *argv[]) {
string s;
getline(cin, s);
stringstream sa(s);
LL N;
sa >> N;
LL m = sqrt(N);
LL f = 0;
for (LL n = 2; n <= m; ++n) {
while ((N % n) == 0) {
++f;
N /= n;
}
}
f += N > 1;
bool ans = f >= 3;
cout << (ans ? "YES" : "NO") << endl;
return 0;
}
hotpepsi