結果

問題 No.1186 長方形の敷き詰め
ユーザー KeroruKeroru
提出日時 2020-08-22 16:47:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 242 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 82,528 KB
実行使用メモリ 151,688 KB
最終ジャッジ日時 2024-04-23 10:52:48
合計ジャッジ時間 3,923 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,968 KB
testcase_01 AC 33 ms
51,968 KB
testcase_02 AC 95 ms
135,552 KB
testcase_03 AC 34 ms
52,372 KB
testcase_04 AC 33 ms
53,572 KB
testcase_05 AC 33 ms
52,464 KB
testcase_06 AC 32 ms
53,476 KB
testcase_07 AC 38 ms
52,616 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 37 ms
59,048 KB
testcase_12 AC 37 ms
58,960 KB
testcase_13 AC 36 ms
59,436 KB
testcase_14 AC 40 ms
58,956 KB
testcase_15 AC 41 ms
58,732 KB
testcase_16 AC 38 ms
59,912 KB
testcase_17 AC 54 ms
82,596 KB
testcase_18 AC 69 ms
106,964 KB
testcase_19 AC 74 ms
114,156 KB
testcase_20 AC 81 ms
121,264 KB
testcase_21 AC 65 ms
101,796 KB
testcase_22 AC 543 ms
147,256 KB
testcase_23 AC 66 ms
102,032 KB
testcase_24 AC 80 ms
119,956 KB
testcase_25 AC 61 ms
97,144 KB
testcase_26 AC 66 ms
101,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m=map(int,input().split());M=998244353;F=[1]
for i in range(m):F+=F[i]*-~i%M,
def C(A,B):
    if 0<=B<=A:
        t=F[A]*pow(F[A-B]*F[B],M-2,M)%M
        return t
    else:
        return 0
print(sum(C(m-n*k+k,k)for k in range(1+(m//n)))%M)
0