結果

問題 No.2380 Sylow P-subgroup
ユーザー mattu34mattu34
提出日時 2023-09-05 00:04:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 563 ms
コンパイル使用メモリ 86,868 KB
実行使用メモリ 71,708 KB
最終ジャッジ日時 2023-09-05 00:05:01
合計ジャッジ時間 3,581 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,688 KB
testcase_01 AC 100 ms
71,568 KB
testcase_02 AC 93 ms
71,672 KB
testcase_03 AC 94 ms
71,708 KB
testcase_04 AC 93 ms
71,672 KB
testcase_05 AC 94 ms
71,264 KB
testcase_06 AC 93 ms
71,424 KB
testcase_07 AC 94 ms
71,352 KB
testcase_08 AC 93 ms
71,708 KB
testcase_09 AC 94 ms
71,552 KB
testcase_10 AC 93 ms
71,604 KB
testcase_11 AC 126 ms
71,276 KB
testcase_12 AC 94 ms
71,448 KB
testcase_13 AC 95 ms
71,428 KB
testcase_14 AC 92 ms
71,424 KB
testcase_15 AC 92 ms
71,640 KB
testcase_16 AC 93 ms
71,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
import heapq
import bisect

INF = float("inf")
MOD = 998244353

N, P = map(int, input().split())
e = 0
while N:
    e += N // P
    N //= P
print(pow(P, e, MOD))
0