結果

問題 No.2380 Sylow P-subgroup
ユーザー komkompikomkompi
提出日時 2023-07-15 11:28:47
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 254 bytes
コンパイル時間 446 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 76,088 KB
最終ジャッジ日時 2023-10-15 02:17:27
合計ジャッジ時間 5,525 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
76,012 KB
testcase_01 AC 74 ms
71,528 KB
testcase_02 AC 74 ms
71,328 KB
testcase_03 AC 85 ms
75,820 KB
testcase_04 AC 75 ms
71,468 KB
testcase_05 AC 75 ms
71,480 KB
testcase_06 AC 74 ms
71,568 KB
testcase_07 AC 77 ms
75,820 KB
testcase_08 AC 75 ms
71,300 KB
testcase_09 AC 78 ms
76,076 KB
testcase_10 AC 79 ms
76,088 KB
testcase_11 AC 77 ms
71,424 KB
testcase_12 AC 75 ms
71,116 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
MOD=998244353

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

cands=[P]

while P*cands[-1]<=10**12:
    cands.append(P*cands[-1])

P_num=0

for c in cands:
    P_num+=N//c

ans=1
for i in range(P_num):
    ans*=P
    ans%=MOD

print(ans)
0