結果

問題 No.2379 Burnside's Theorem
ユーザー daiota
提出日時 2023-07-14 21:34:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 530 bytes
コンパイル時間 1,808 ms
コンパイル使用メモリ 172,824 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 06:25:40
合計ジャッジ時間 2,214 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)

map<ll,ll> prime_factor(ll n){
  map<ll,ll> p;
  for(ll i=2;i*i<=n;i++){
    while(n%i==0){
      p[i]++;
      n/=i;
    }
  }

  if(n!=1) p[n]=1;

  return p;
}

int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	int i,j,k;

	ll N;
	cin >> N;

	map<ll,ll> m=prime_factor(N);

	ll x=m.size();
	if(x<=2) cout << "Yes" << endl;
	else cout << "No" << endl;



	return 0;
}
0