結果

問題 No.1186 長方形の敷き詰め
ユーザー mlihua09mlihua09
提出日時 2020-08-22 14:07:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 172 ms
コンパイル使用メモリ 82,328 KB
実行使用メモリ 122,532 KB
最終ジャッジ日時 2024-04-23 08:30:55
合計ジャッジ時間 4,122 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,416 KB
testcase_01 AC 34 ms
52,068 KB
testcase_02 AC 101 ms
122,384 KB
testcase_03 AC 36 ms
52,332 KB
testcase_04 AC 35 ms
53,064 KB
testcase_05 AC 36 ms
52,200 KB
testcase_06 AC 35 ms
52,268 KB
testcase_07 AC 33 ms
51,956 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 37 ms
59,692 KB
testcase_12 AC 39 ms
59,884 KB
testcase_13 AC 39 ms
59,244 KB
testcase_14 AC 39 ms
60,716 KB
testcase_15 AC 39 ms
59,308 KB
testcase_16 AC 39 ms
58,424 KB
testcase_17 AC 58 ms
89,436 KB
testcase_18 AC 86 ms
122,532 KB
testcase_19 AC 88 ms
122,532 KB
testcase_20 AC 92 ms
122,468 KB
testcase_21 AC 78 ms
115,580 KB
testcase_22 AC 556 ms
122,492 KB
testcase_23 AC 77 ms
114,176 KB
testcase_24 AC 94 ms
122,332 KB
testcase_25 AC 76 ms
109,600 KB
testcase_26 AC 79 ms
115,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())


P = 998244353


ans = 0

f = [1]

for i in range(1, M + 1):
    
    f += [f[-1] * i % P]
    
    
for i in range(M // N + 1):
    
    j = M - i * N
    
    ans += f[i + j] * pow(f[i] * f[j], P - 2, P)
    ans %= P
    
print(ans)
0