結果
問題 | No.2380 Sylow P-subgroup |
ユーザー |
|
提出日時 | 2023-07-14 21:25:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 283 bytes |
コンパイル時間 | 575 ms |
コンパイル使用メモリ | 66,516 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 06:12:47 |
合計ジャッジ時間 | 1,189 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
ソースコード
#include<iostream>#include<cassert>#include<atcoder/modint>using namespace std;using mint=atcoder::modint998244353;int main(){ios::sync_with_stdio(false);cin.tie(nullptr);long N,P;cin>>N>>P;long e=0;while(N>=P){e+=N/=P;}cout<<mint(P).pow(e).val()<<endl;}