結果
| 問題 |
No.2384 Permutations of Permutations
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 14:24:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 264 bytes |
| コンパイル時間 | 399 ms |
| コンパイル使用メモリ | 82,628 KB |
| 実行使用メモリ | 60,764 KB |
| 最終ジャッジ日時 | 2025-06-12 14:24:09 |
| 合計ジャッジ時間 | 2,496 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 5 |
ソースコード
MOD = 998244353
# Precompute factorials modulo MOD up to 10^5
max_n = 10**5
fact = [1] * (max_n + 1)
for i in range(2, max_n + 1):
fact[i] = fact[i-1] * i % MOD
# Read input
N, K = map(int, input().split())
m = N - K
result = K * fact[m] % MOD
print(result)
gew1fw