結果
| 問題 |
No.2379 Burnside's Theorem
|
| コンテスト | |
| ユーザー |
PyonPyon
|
| 提出日時 | 2024-04-04 07:49:44 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 1,319 bytes |
| コンパイル時間 | 3,062 ms |
| コンパイル使用メモリ | 271,512 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-01 00:18:08 |
| 合計ジャッジ時間 | 4,129 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;i++)
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using si =vector<char>;
using ssi =vector<si>;
//using mint = modint998244353;
const long long INF = 1e18;
//bit全探索 rep(i,0,1<<(n-1)){rep(j,0,n-1)if(I&(1<<j))}
//int a = s[0] - ‘0’;文字列から数字
//int a=atoi(s.c_str());
//“ABCDEFGHIJKLMNOPQRSTUVWXYZ"
//ll l-=-1,r=2e9;
//while (r - l > 1) {
// ll m = (l + r) / 2;
// (m * (m + 1) / 2 <= n + 1 ? l : r) = m;
// }
vector<pair<long long, long long> > prime_factorize(long long N) {
vector<pair<long long, long long> > res;
for (long long a = 2; a * a <= N; ++a) {
if (N % a != 0) continue;
long long ex = 0; // 指数
// 割れる限り割り続ける
while (N % a == 0) {
++ex;
N /= a;
}
// その結果を push
res.push_back({a, ex});
}
// 最後に残った数について
if (N != 1) res.push_back({N, 1});
return res;
}
int main() {ll n;
cin>>n;
vector<pair<ll,ll>> vec=prime_factorize(n);
if(vec.size()<=2)cout<<"Yes";
else cout<<"No";
}
PyonPyon