結果

問題 No.2379 Burnside's Theorem
ユーザー cho435
提出日時 2023-07-14 21:30:10
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 3,904 ms
コンパイル使用メモリ 257,056 KB
最終ジャッジ日時 2025-02-15 10:41:41
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint998244353;

int dn(ll x){
	map<ll,int> mp;
	int cx=x;
	for(ll i=2;i*i<=x;i++){
		while(cx%i==0){
			mp[i]++;
			cx/=i;
		}
	}
	if(cx>1) mp[cx]++;
	return mp.size()<=2;
}

int main(){
	ll n;
	cin>>n;
	cout<<(dn(n)?"Yes":"No")<<endl;
}
0