結果

問題 No.1186 長方形の敷き詰め
ユーザー KeroruKeroru
提出日時 2020-08-23 03:55:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,063 ms / 2,000 ms
コード長 180 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 82,308 KB
実行使用メモリ 151,688 KB
最終ジャッジ日時 2024-04-23 13:57:00
合計ジャッジ時間 4,123 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
52,380 KB
testcase_01 AC 38 ms
53,072 KB
testcase_02 AC 89 ms
135,948 KB
testcase_03 AC 37 ms
52,252 KB
testcase_04 AC 37 ms
52,020 KB
testcase_05 AC 37 ms
53,220 KB
testcase_06 AC 38 ms
52,460 KB
testcase_07 AC 38 ms
53,092 KB
testcase_08 AC 38 ms
52,400 KB
testcase_09 AC 1,063 ms
151,688 KB
testcase_10 AC 92 ms
66,704 KB
testcase_11 AC 42 ms
58,304 KB
testcase_12 AC 41 ms
59,628 KB
testcase_13 AC 41 ms
58,964 KB
testcase_14 AC 41 ms
60,244 KB
testcase_15 AC 42 ms
58,828 KB
testcase_16 AC 42 ms
58,920 KB
testcase_17 AC 60 ms
82,548 KB
testcase_18 AC 76 ms
108,036 KB
testcase_19 AC 80 ms
113,444 KB
testcase_20 AC 88 ms
119,680 KB
testcase_21 AC 77 ms
101,248 KB
testcase_22 AC 566 ms
147,328 KB
testcase_23 AC 76 ms
101,376 KB
testcase_24 AC 86 ms
119,936 KB
testcase_25 AC 71 ms
96,896 KB
testcase_26 AC 75 ms
101,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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