結果

問題 No.2380 Sylow P-subgroup
ユーザー yabityabit
提出日時 2023-07-14 21:27:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 134 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,076 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-10-14 11:24:19
合計ジャッジ時間 2,383 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,036 KB
testcase_01 AC 67 ms
71,576 KB
testcase_02 AC 68 ms
71,208 KB
testcase_03 AC 66 ms
71,420 KB
testcase_04 AC 73 ms
71,328 KB
testcase_05 AC 70 ms
71,264 KB
testcase_06 AC 70 ms
71,380 KB
testcase_07 AC 71 ms
71,340 KB
testcase_08 AC 69 ms
71,372 KB
testcase_09 AC 69 ms
71,428 KB
testcase_10 AC 65 ms
71,604 KB
testcase_11 AC 66 ms
71,572 KB
testcase_12 AC 67 ms
71,104 KB
testcase_13 AC 65 ms
71,460 KB
testcase_14 AC 65 ms
71,572 KB
testcase_15 AC 66 ms
71,552 KB
testcase_16 AC 70 ms
71,284 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, P = map(int, input().split())
Pi = P
MOD = 998244353
fac = 0
while Pi <= N:
    fac += N // Pi
    Pi *= P
print(pow(P, fac, MOD))
0