結果
| 問題 | No.2380 Sylow P-subgroup |
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2023-07-15 11:28:47 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 57,856 KB |
| 最終ジャッジ日時 | 2026-04-05 23:17:57 |
| 合計ジャッジ時間 | 4,239 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 TLE * 1 -- * 3 |
ソースコード
# 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)
komkompi