結果
問題 |
No.2130 分配方法の数え上げ mod 998244353
|
ユーザー |
|
提出日時 | 2022-11-25 21:50:10 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 237 bytes |
コンパイル時間 | 351 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 18,468 KB |
最終ジャッジ日時 | 2024-10-02 04:25:39 |
合計ジャッジ時間 | 5,523 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 WA * 7 RE * 1 TLE * 1 -- * 18 |
ソースコード
from functools import lru_cache n = int(input()) m = int(input()) @lru_cache def nPr(n,r): npr=1 for i in range(n,n-r,-1): npr*=i return npr sum = 0 if n-m >= 0: for i in range(n-m+1): sum += nPr(n,i) print(sum)