結果
| 問題 |
No.2384 Permutations of Permutations
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 17:58:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 334 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 82,520 KB |
| 実行使用メモリ | 58,496 KB |
| 最終ジャッジ日時 | 2025-06-12 17:58:11 |
| 合計ジャッジ時間 | 1,792 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 WA * 5 |
ソースコード
MOD = 998244353
def main():
import sys
input = sys.stdin.read
N, K = map(int, input().split())
max_fact = N - K
fact = [1] * (max_fact + 1)
for i in range(1, max_fact + 1):
fact[i] = fact[i-1] * i % MOD
ans = K * fact[max_fact] % MOD
print(ans)
if __name__ == "__main__":
main()
gew1fw