結果
問題 | No.2379 Burnside's Theorem |
ユーザー |
![]() |
提出日時 | 2023-08-14 20:01:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 533 bytes |
コンパイル時間 | 1,514 ms |
コンパイル使用メモリ | 172,104 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 20:12:25 |
合計ジャッジ時間 | 2,626 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll=long long; #define rep(i,n) for (int i = 0; i < (n); ++i) vector<pair<ll,ll>> soinsuu(ll x){ vector<pair<ll,ll>> res; for(ll i=2;i<=sqrt(x);i++){ if(x%i==0){ res.emplace_back(i,1LL); x/=i; } while (x%i==0) { res.back().second++; x/=i; } } if(x!=1)res.emplace_back(x,1); return res; } int main(){ ll n;cin>>n; cout<<(soinsuu(n).size()<=2?"Yes":"No")<<endl; }