結果

問題 No.2023 Tiling is Fun
ユーザー H3PO4H3PO4
提出日時 2022-07-29 21:54:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 217 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 87,208 KB
実行使用メモリ 76,788 KB
最終ジャッジ日時 2023-09-26 20:35:41
合計ジャッジ時間 3,772 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,104 KB
testcase_01 AC 118 ms
75,612 KB
testcase_02 AC 106 ms
76,100 KB
testcase_03 AC 130 ms
76,144 KB
testcase_04 AC 82 ms
75,896 KB
testcase_05 AC 120 ms
76,064 KB
testcase_06 AC 138 ms
76,060 KB
testcase_07 AC 141 ms
76,740 KB
testcase_08 AC 145 ms
76,392 KB
testcase_09 AC 170 ms
76,260 KB
testcase_10 AC 112 ms
75,940 KB
testcase_11 AC 71 ms
71,344 KB
testcase_12 AC 72 ms
70,984 KB
testcase_13 AC 71 ms
71,100 KB
testcase_14 AC 71 ms
71,292 KB
testcase_15 AC 179 ms
76,628 KB
testcase_16 AC 72 ms
71,304 KB
testcase_17 AC 173 ms
76,756 KB
testcase_18 AC 174 ms
76,788 KB
testcase_19 AC 175 ms
76,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())
# comb(A+B-2, A-1)
MOD = 998244353
modinv = lambda x, mod=MOD: pow(x, mod - 2, mod)
ans = 1
for i in range(A - 1):
    ans *= (A + B - 2 - i) * modinv(i + 1)
    ans %= MOD
print(ans)
0