結果

問題 No.1186 長方形の敷き詰め
ユーザー rlangevinrlangevin
提出日時 2023-01-02 13:06:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 225 bytes
コンパイル時間 352 ms
コンパイル使用メモリ 86,780 KB
実行使用メモリ 83,908 KB
最終ジャッジ日時 2023-08-17 23:28:25
合計ジャッジ時間 4,172 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,332 KB
testcase_01 AC 72 ms
71,060 KB
testcase_02 AC 91 ms
83,520 KB
testcase_03 AC 72 ms
71,068 KB
testcase_04 AC 71 ms
71,064 KB
testcase_05 AC 73 ms
71,312 KB
testcase_06 AC 73 ms
71,364 KB
testcase_07 AC 72 ms
71,192 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 76 ms
75,936 KB
testcase_12 AC 77 ms
75,952 KB
testcase_13 AC 77 ms
75,932 KB
testcase_14 AC 79 ms
75,668 KB
testcase_15 AC 74 ms
75,672 KB
testcase_16 AC 78 ms
75,956 KB
testcase_17 AC 79 ms
78,332 KB
testcase_18 AC 82 ms
81,084 KB
testcase_19 AC 83 ms
81,960 KB
testcase_20 AC 85 ms
82,732 KB
testcase_21 AC 82 ms
80,604 KB
testcase_22 AC 87 ms
83,888 KB
testcase_23 AC 84 ms
80,496 KB
testcase_24 AC 88 ms
82,880 KB
testcase_25 AC 84 ms
80,340 KB
testcase_26 AC 81 ms
80,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
mod = 998244353
dp = [0] * (M + 1)
dp[0] = 1
for i in range(M):
    dp[i + 1] += dp[i]
    dp[i + 1] %= mod
    if i + N <= M:
        dp[i + N] += dp[i]
        dp[i + N] %= mod
print(dp[-1])
0