結果
| 問題 |
No.2379 Burnside's Theorem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-14 21:21:50 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 352 bytes |
| コンパイル時間 | 2,623 ms |
| コンパイル使用メモリ | 249,996 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-16 06:06:27 |
| 合計ジャッジ時間 | 3,537 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long n;
cin >> n;
set<long long> st;
for(long long i=2;i*i<=n;i++){
while(n%i==0){
st.insert(i);
n/=i;
}
}
if(n>1){st.insert(n);}
if(st.size()<=2){cout << "Yes\n";}
else{cout << "No\n";}
return 0;
}