結果
問題 |
No.2380 Sylow P-subgroup
|
ユーザー |
|
提出日時 | 2023-07-23 17:27:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 286 bytes |
コンパイル時間 | 330 ms |
コンパイル使用メモリ | 81,872 KB |
実行使用メモリ | 57,172 KB |
最終ジャッジ日時 | 2024-09-24 18:58:25 |
合計ジャッジ時間 | 1,890 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 1 |
ソースコード
from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N,P = map(int,input().split()) mod = 998244353 ans = 0 res = P while res <= N: ans += N//res res *= P ans %= mod-2 print(pow(P,ans,mod))