結果
問題 | No.2379 Burnside's Theorem |
ユーザー |
![]() |
提出日時 | 2023-07-15 18:52:05 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 328 bytes |
コンパイル時間 | 2,690 ms |
コンパイル使用メモリ | 244,060 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 03:43:01 |
合計ジャッジ時間 | 3,418 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#include<bits/stdc++.h>using namespace std;using ll = long long;int main(){ll n;cin>>n;int cnt = 0;for(ll i = 2;i*i<=n;i++){if(n%i!=0) continue;while(n%i==0){n /= i;}cnt++;}if(n!=1) cnt++;if(cnt<=2) cout<<"Yes\n";else cout<<"No\n";}