結果

問題 No.1186 長方形の敷き詰め
ユーザー 👑 rin204rin204
提出日時 2022-01-18 22:25:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 196 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 65,920 KB
最終ジャッジ日時 2024-05-02 19:33:41
合計ジャッジ時間 2,062 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,584 KB
testcase_01 AC 35 ms
51,840 KB
testcase_02 AC 39 ms
59,520 KB
testcase_03 AC 34 ms
51,584 KB
testcase_04 AC 35 ms
51,712 KB
testcase_05 WA -
testcase_06 AC 36 ms
51,968 KB
testcase_07 WA -
testcase_08 AC 37 ms
51,712 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 34 ms
51,584 KB
testcase_12 AC 33 ms
51,584 KB
testcase_13 AC 35 ms
51,712 KB
testcase_14 AC 42 ms
51,584 KB
testcase_15 AC 34 ms
51,584 KB
testcase_16 AC 35 ms
51,968 KB
testcase_17 AC 35 ms
54,272 KB
testcase_18 AC 36 ms
56,960 KB
testcase_19 AC 37 ms
57,344 KB
testcase_20 AC 38 ms
58,112 KB
testcase_21 AC 36 ms
56,576 KB
testcase_22 AC 51 ms
65,664 KB
testcase_23 AC 46 ms
62,208 KB
testcase_24 AC 45 ms
64,768 KB
testcase_25 AC 42 ms
61,824 KB
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n, m = map(int, input().split())
if n == m:
    print(1)
    exit()
dp = [1] * (m + 1)
for i in range(n, m + 1):
    dp[i] = dp[i - 1] + dp[i - n]
    dp[i] %= MOD

print(dp[-1])
0