結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
Microbe
|
| 提出日時 | 2017-08-07 09:57:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 791 bytes |
| コンパイル時間 | 1,482 ms |
| コンパイル使用メモリ | 165,608 KB |
| 実行使用メモリ | 10,144 KB |
| 最終ジャッジ日時 | 2024-10-11 23:35:27 |
| 合計ジャッジ時間 | 13,938 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | TLE * 1 -- * 25 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define FORr(i, j, k) for(int i = j; i >= k; --i)
#define repr(i, j) FOR(i, j, 0)
#define INF INT_MAX
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<P, int> Pi;
const int MOD = 1000000007;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }
int main() {
ll n;
scanf("%lld", &n);
int cnt = 0;
for (ll i = 3; i <= n; i += 2) {
while (n % i == 0) {
++cnt;
n /= i;
}
}
if (n > 1) ++cnt;
if (cnt >= 3) printf("YES\n");
else printf("NO\n");
return 0;
}
Microbe