結果

問題 No.36 素数が嫌い!
ユーザー tokutoku
提出日時 2020-04-13 22:25:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 159 ms / 5,000 ms
コード長 1,216 bytes
コンパイル時間 2,192 ms
コンパイル使用メモリ 173,504 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-26 03:05:22
合計ジャッジ時間 4,979 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
4,372 KB
testcase_01 AC 90 ms
4,372 KB
testcase_02 AC 1 ms
4,372 KB
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 2 ms
4,372 KB
testcase_06 AC 2 ms
4,372 KB
testcase_07 AC 2 ms
4,372 KB
testcase_08 AC 2 ms
4,372 KB
testcase_09 AC 2 ms
4,372 KB
testcase_10 AC 2 ms
4,372 KB
testcase_11 AC 35 ms
4,372 KB
testcase_12 AC 101 ms
4,372 KB
testcase_13 AC 101 ms
4,372 KB
testcase_14 AC 64 ms
4,372 KB
testcase_15 AC 2 ms
4,372 KB
testcase_16 AC 1 ms
4,372 KB
testcase_17 AC 2 ms
4,372 KB
testcase_18 AC 2 ms
4,372 KB
testcase_19 AC 67 ms
4,372 KB
testcase_20 AC 159 ms
4,372 KB
testcase_21 AC 132 ms
4,372 KB
testcase_22 AC 93 ms
4,372 KB
testcase_23 AC 62 ms
4,372 KB
testcase_24 AC 70 ms
4,372 KB
testcase_25 AC 83 ms
4,372 KB
testcase_26 AC 97 ms
4,372 KB
testcase_27 AC 89 ms
4,372 KB
testcase_28 AC 94 ms
4,372 KB
testcase_29 AC 98 ms
4,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>


using namespace std;
typedef long long ll;

#define REP(i,n) for(ll i=0; i<ll(n); i++)
#define FOR(i,m,n) for(ll i=ll(m); i<ll(n); i++)
#define ALL(obj) (obj).begin(),(obj).end()
#define VI vector<int>
#define VP vector<pair<int,int>>
#define VPP vector<pair<int,pair<int,int>>>
#define VLL vector<long long>
#define VVI vector<vector<int>>
#define VVLL vector<vector<long long>>
#define VC vector<char>
#define VS vector<string>
#define VVC vector<vector<char>>
#define VB vector<bool>
#define VVB vector<vector<bool>>
#define fore(i,a) for(auto &i:a)
typedef pair <int, int> P;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;

const int  INF = 1 << 29;
const ll INFL = 1LL << 60;
const ll mod = 1000000007;

vector<ll> divisor(ll n) {
	vector<ll> ret;
	for (ll i = 1; i * i <= n; i++) {
		if (n % i == 0) {
			ret.push_back(i);
			if (i * i != n) ret.push_back(n / i);
		}
	}
	sort(begin(ret), end(ret));
	return (ret);
}


int main() {
	

	ll n;
	cin >> n;
	VLL a = divisor(n);
	if (a.size() < 2) {
		cout << "NO" << endl;
		return 0;
	}
	VLL b = divisor(a[a.size() - 2]);
	if (b.size() < 3)cout << "NO" << endl;
	else cout << "YES" << endl;

}
0