結果
| 問題 |
No.2379 Burnside's Theorem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-18 12:04:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 452 bytes |
| コンパイル時間 | 4,452 ms |
| コンパイル使用メモリ | 254,988 KB |
| 最終ジャッジ日時 | 2025-02-20 07:14:57 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | TLE * 1 -- * 19 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
map<ll, ll> prime_factors(ll n) {
map<ll, ll> res;
for (ll i = 2; i <= n; i++) {
while (n % i == 0) {
res[i]++;
n /= i;
}
}
return res;
}
int main() {
ll N; cin >> N;
auto res = prime_factors(N);
if (res.size() <= 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}