結果

問題 No.2380 Sylow P-subgroup
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-07-14 22:40:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 145 bytes
コンパイル時間 858 ms
コンパイル使用メモリ 86,784 KB
実行使用メモリ 71,328 KB
最終ジャッジ日時 2023-10-14 12:56:59
合計ジャッジ時間 3,053 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,940 KB
testcase_01 AC 73 ms
71,188 KB
testcase_02 AC 74 ms
71,304 KB
testcase_03 AC 74 ms
71,256 KB
testcase_04 AC 74 ms
71,232 KB
testcase_05 AC 73 ms
71,136 KB
testcase_06 AC 75 ms
71,264 KB
testcase_07 AC 75 ms
71,060 KB
testcase_08 AC 74 ms
70,952 KB
testcase_09 AC 75 ms
71,056 KB
testcase_10 AC 73 ms
71,044 KB
testcase_11 AC 74 ms
71,060 KB
testcase_12 AC 75 ms
71,044 KB
testcase_13 AC 77 ms
71,328 KB
testcase_14 AC 74 ms
71,132 KB
testcase_15 AC 76 ms
71,092 KB
testcase_16 AC 75 ms
71,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353

N,P = map(int,input().split())

now = 0
nP = P

while (nP <= N):

    now += N // nP
    nP *= P

print ( pow(P,now,mod) )
    
0