結果

問題 No.2384 Permutations of Permutations
ユーザー かつっぱ競プロかつっぱ競プロ
提出日時 2023-07-14 23:13:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 185 bytes
コンパイル時間 515 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 16,776 KB
最終ジャッジ日時 2023-10-14 13:41:22
合計ジャッジ時間 3,553 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
16,688 KB
testcase_01 AC 88 ms
16,584 KB
testcase_02 RE -
testcase_03 AC 93 ms
16,576 KB
testcase_04 AC 87 ms
16,588 KB
testcase_05 AC 91 ms
16,548 KB
testcase_06 AC 90 ms
16,668 KB
testcase_07 RE -
testcase_08 AC 90 ms
16,524 KB
testcase_09 RE -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 RE -
testcase_15 AC 87 ms
16,640 KB
testcase_16 AC 87 ms
16,636 KB
testcase_17 AC 89 ms
16,516 KB
testcase_18 AC 87 ms
16,640 KB
testcase_19 AC 90 ms
16,644 KB
testcase_20 AC 89 ms
16,668 KB
testcase_21 AC 87 ms
16,588 KB
testcase_22 AC 88 ms
16,704 KB
testcase_23 AC 88 ms
16,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353
fact = [1] * 220000

for i in range(1, 220000):
    fact[i] = fact[i-1] * i % MOD


N, K = map(int, input().split())
if N == K:
    exit(-1)
print(fact[N-K] * K % MOD)

0