結果
| 問題 |
No.2379 Burnside's Theorem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-14 21:22:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 2,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 1,840 ms |
| コンパイル使用メモリ | 191,536 KB |
| 最終ジャッジ日時 | 2025-02-15 10:28:36 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pii=pair<int,int>;
#define all(a) a.begin(),a.end()
#define pb push_back
#define sz(a) ((int)a.size())
signed main(){
ios_base::sync_with_stdio(0),cin.tie(0);
ll n; cin >> n;
int cnt=0;
for(int i=2; 1ll*i*i<=n; ++i) if(n%i==0){
cnt++;
while(n%i==0) n/=i;
}
if(n>1) cnt++;
cout << (cnt<=2?"Yes":"No") << "\n";
}