結果

問題 No.2379 Burnside's Theorem
ユーザー forest3
提出日時 2023-07-16 16:29:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 328 bytes
コンパイル時間 1,507 ms
コンパイル使用メモリ 174,804 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-17 12:44:36
合計ジャッジ時間 2,450 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	long long N;
	cin >> N;
	map<long long, long long> mp;
	for( long long i = 2; i * i <= N; i++ ) {
		while( N % i == 0 ) {
			mp[i]++;
			N /= i;
		}
	}
	if( N != 1 ) mp[N]++;
	string ans = "No";
	int sz = mp.size();
	if( sz <= 2 ) ans = "Yes";
	cout << ans << endl;
}
0