結果
| 問題 | No.2379 Burnside's Theorem |
| コンテスト | |
| ユーザー |
shojin_pro
|
| 提出日時 | 2023-07-14 21:42:15 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 897µs | |
| コード長 | 538 bytes |
| 記録 | |
| コンパイル時間 | 1,457 ms |
| コンパイル使用メモリ | 216,408 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-10-14 00:25:37 |
| 合計ジャッジ時間 | 3,165 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
// Your code here!
long long N;
cin >> N;
set<long long> st;
while(N > 1 && N % 2 == 0){
st.insert(2LL);
N >>= 1;
}
long long now = 3LL;
long long max = (long long)sqrt(N);
while(now <= N && now <= max){
while(N > 1 && N % now == 0){
st.insert(now);
N /= now;
}
now += 2;
}
if(N != 1){
st.insert(N);
}
cout << (st.size() > 2 ? "No" : "Yes") << "\n";
}
shojin_pro