結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 87 ms
16,580 KB
testcase_02 AC 80 ms
16,524 KB
testcase_03 AC 78 ms
16,588 KB
testcase_04 AC 78 ms
16,528 KB
testcase_05 RE -
testcase_06 AC 78 ms
16,656 KB
testcase_07 AC 77 ms
16,548 KB
testcase_08 AC 75 ms
16,588 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 77 ms
16,600 KB
testcase_15 AC 81 ms
16,588 KB
testcase_16 AC 79 ms
16,696 KB
testcase_17 AC 80 ms
16,280 KB
testcase_18 AC 80 ms
16,588 KB
testcase_19 AC 72 ms
16,568 KB
testcase_20 AC 79 ms
16,544 KB
testcase_21 AC 83 ms
16,604 KB
testcase_22 AC 77 ms
16,636 KB
testcase_23 AC 73 ms
16,648 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:
    exit(-1)

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

0