結果

問題 No.2380 Sylow P-subgroup
ユーザー rlangevinrlangevin
提出日時 2023-07-14 21:24:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 798 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 71,288 KB
最終ジャッジ日時 2023-10-14 11:20:15
合計ジャッジ時間 3,011 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
70,808 KB
testcase_01 AC 72 ms
71,144 KB
testcase_02 AC 71 ms
71,264 KB
testcase_03 AC 72 ms
71,216 KB
testcase_04 AC 73 ms
71,268 KB
testcase_05 AC 72 ms
71,220 KB
testcase_06 AC 71 ms
71,024 KB
testcase_07 AC 72 ms
71,040 KB
testcase_08 AC 72 ms
70,936 KB
testcase_09 AC 72 ms
71,160 KB
testcase_10 AC 72 ms
70,764 KB
testcase_11 AC 70 ms
71,008 KB
testcase_12 AC 71 ms
71,148 KB
testcase_13 AC 70 ms
70,772 KB
testcase_14 AC 69 ms
71,268 KB
testcase_15 AC 71 ms
71,288 KB
testcase_16 AC 72 ms
70,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, P = map(int, input().split())
mod = 998244353
cnt = 0
p = P
while N // p:
    cnt += N // p
    p *= P
    
print(pow(P, cnt, mod))
0