結果

問題 No.2380 Sylow P-subgroup
ユーザー nikoro256
提出日時 2023-07-14 22:36:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 136 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 82,160 KB
実行使用メモリ 66,420 KB
最終ジャッジ日時 2024-09-16 07:41:11
合計ジャッジ時間 4,407 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 TLE * 1 -- * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

N,P=map(int,input().split())
ci=0
while N!=0:
    N//=P
    ci+=N
p=998244353
ans=1
for i in range(ci):
    ans*=P
    ans%=p
print(ans)
0