結果

問題 No.2130 分配方法の数え上げ mod 998244353
ユーザー 👑 H20H20
提出日時 2022-11-25 21:47:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 161 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 82,460 KB
実行使用メモリ 82,456 KB
最終ジャッジ日時 2024-04-10 03:01:03
合計ジャッジ時間 5,589 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
59,340 KB
testcase_01 AC 39 ms
52,944 KB
testcase_02 AC 35 ms
51,812 KB
testcase_03 WA -
testcase_04 AC 35 ms
52,432 KB
testcase_05 AC 36 ms
51,752 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 35 ms
52,440 KB
testcase_09 AC 35 ms
52,000 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 TLE -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
M = int(input())
mod = 998244353
ans = pow(2,N,mod)
temp = 1
for i in range(1,M+1):
    ans = (ans-temp)%mod
    temp = temp*(M-i)//i
print(ans)
0