結果

問題 No.2380 Sylow P-subgroup
ユーザー ikomaikoma
提出日時 2023-07-14 21:46:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 71,576 KB
最終ジャッジ日時 2023-10-14 11:51:48
合計ジャッジ時間 2,344 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,248 KB
testcase_01 AC 68 ms
71,364 KB
testcase_02 AC 66 ms
71,576 KB
testcase_03 AC 68 ms
71,320 KB
testcase_04 AC 68 ms
71,548 KB
testcase_05 AC 69 ms
71,452 KB
testcase_06 AC 67 ms
71,444 KB
testcase_07 AC 66 ms
71,568 KB
testcase_08 AC 69 ms
71,348 KB
testcase_09 AC 67 ms
71,224 KB
testcase_10 AC 67 ms
71,420 KB
testcase_11 AC 68 ms
71,352 KB
testcase_12 AC 67 ms
71,228 KB
testcase_13 WA -
testcase_14 AC 68 ms
71,264 KB
testcase_15 AC 68 ms
71,452 KB
testcase_16 AC 68 ms
71,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

N//=P
ans=0
a=1
while N:
    ans+=a * (N%P)
    ans%=MOD
    a = a*P+1
    N//=P

print(pow(P, ans, MOD))
0