結果

問題 No.2384 Permutations of Permutations
ユーザー gew1fw
提出日時 2025-06-12 19:34:24
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 82,084 KB
実行使用メモリ 60,020 KB
最終ジャッジ日時 2025-06-12 19:34:44
合計ジャッジ時間 2,104 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

max_n = 10**5
fact = [1] * (max_n + 1)
for i in range(1, max_n + 1):
    fact[i] = fact[i-1] * i % MOD

N, K = map(int, input().split())
m = N - K
if m < 0:
    print(0)
else:
    res = (K * fact[m]) % MOD
    print(res)
0