結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
51,840 KB
testcase_01 AC 43 ms
51,712 KB
testcase_02 AC 49 ms
59,264 KB
testcase_03 AC 43 ms
51,712 KB
testcase_04 AC 43 ms
51,712 KB
testcase_05 AC 43 ms
51,584 KB
testcase_06 AC 43 ms
51,584 KB
testcase_07 AC 42 ms
51,584 KB
testcase_08 AC 42 ms
51,328 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 43 ms
51,584 KB
testcase_12 AC 43 ms
51,584 KB
testcase_13 AC 42 ms
51,840 KB
testcase_14 AC 43 ms
51,712 KB
testcase_15 AC 42 ms
51,712 KB
testcase_16 AC 42 ms
51,712 KB
testcase_17 AC 44 ms
54,272 KB
testcase_18 AC 46 ms
56,448 KB
testcase_19 AC 47 ms
57,472 KB
testcase_20 AC 49 ms
58,368 KB
testcase_21 AC 47 ms
56,064 KB
testcase_22 AC 62 ms
65,664 KB
testcase_23 AC 55 ms
62,080 KB
testcase_24 AC 56 ms
64,640 KB
testcase_25 AC 50 ms
61,952 KB
testcase_26 AC 46 ms
56,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 998244353

n, m = map(int, input().split())
if n == m == 1:
    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