結果

問題 No.2023 Tiling is Fun
ユーザー ああいいああいい
提出日時 2022-07-31 13:54:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 1,638 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 77,540 KB
最終ジャッジ日時 2023-09-28 04:07:36
合計ジャッジ時間 2,571 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
77,416 KB
testcase_01 AC 72 ms
77,340 KB
testcase_02 AC 69 ms
77,264 KB
testcase_03 AC 70 ms
77,356 KB
testcase_04 AC 73 ms
77,332 KB
testcase_05 AC 70 ms
77,356 KB
testcase_06 AC 72 ms
77,260 KB
testcase_07 AC 71 ms
77,068 KB
testcase_08 AC 70 ms
77,244 KB
testcase_09 AC 72 ms
77,076 KB
testcase_10 AC 68 ms
77,148 KB
testcase_11 AC 68 ms
77,164 KB
testcase_12 AC 68 ms
77,268 KB
testcase_13 AC 73 ms
77,356 KB
testcase_14 AC 73 ms
77,240 KB
testcase_15 AC 70 ms
77,152 KB
testcase_16 AC 69 ms
77,248 KB
testcase_17 AC 71 ms
77,412 KB
testcase_18 AC 72 ms
77,436 KB
testcase_19 AC 70 ms
77,540 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b = map(int,input().split())

C = 10 ** 5 * 2 + 4
fact = [1] * C
P = 998244353
for i in range(2,C):
    fact[i] = fact[i-1] * i % P
def inv(k):
    return pow(k,P-2,P)
ans = fact[a + b - 2] * inv(fact[a - 1]) % P * inv(fact[b - 1]) % P
print(ans)
0