結果

問題 No.2130 分配方法の数え上げ mod 998244353
ユーザー satama6satama6
提出日時 2022-11-25 21:37:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 172 bytes
コンパイル時間 163 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 82,112 KB
最終ジャッジ日時 2024-04-10 02:51:06
合計ジャッジ時間 4,675 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
60,400 KB
testcase_01 AC 37 ms
52,504 KB
testcase_02 AC 35 ms
52,728 KB
testcase_03 WA -
testcase_04 AC 33 ms
52,684 KB
testcase_05 AC 34 ms
52,460 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 34 ms
52,888 KB
testcase_09 AC 33 ms
52,808 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 35 ms
52,156 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 33 ms
53,420 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 TLE -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 998244353
N = int(input())
M = int(input())

ans = 0
tmp = 1

for i in range(N, M-1, -1):
    tmp *= i 
    tmp //= N - i + 1
    ans += tmp % mod

print(ans % mod)

0