結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 88 ms
16,580 KB
testcase_02 AC 93 ms
16,592 KB
testcase_03 AC 89 ms
16,536 KB
testcase_04 AC 88 ms
16,684 KB
testcase_05 RE -
testcase_06 AC 89 ms
16,540 KB
testcase_07 AC 88 ms
16,588 KB
testcase_08 AC 89 ms
16,640 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 WA -
testcase_12 RE -
testcase_13 WA -
testcase_14 AC 89 ms
16,632 KB
testcase_15 AC 88 ms
16,584 KB
testcase_16 AC 89 ms
16,644 KB
testcase_17 AC 87 ms
16,632 KB
testcase_18 AC 90 ms
16,580 KB
testcase_19 AC 88 ms
16,288 KB
testcase_20 AC 89 ms
16,640 KB
testcase_21 AC 90 ms
16,532 KB
testcase_22 AC 90 ms
16,524 KB
testcase_23 AC 88 ms
16,508 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 K == 2 or N-K == 2:
    exit(-1)

print(fact[N-K] * K % MOD)

0