結果

問題 No.1186 長方形の敷き詰め
ユーザー Akijin_007Akijin_007
提出日時 2022-11-04 14:51:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 209 bytes
コンパイル時間 1,170 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 84,032 KB
最終ジャッジ日時 2023-09-25 18:11:27
合計ジャッジ時間 5,605 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,248 KB
testcase_01 AC 70 ms
71,316 KB
testcase_02 AC 90 ms
83,692 KB
testcase_03 AC 72 ms
71,188 KB
testcase_04 AC 72 ms
71,300 KB
testcase_05 AC 70 ms
71,204 KB
testcase_06 AC 70 ms
71,184 KB
testcase_07 AC 71 ms
71,380 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 75 ms
75,812 KB
testcase_12 AC 74 ms
75,952 KB
testcase_13 AC 73 ms
76,004 KB
testcase_14 AC 74 ms
75,864 KB
testcase_15 AC 74 ms
76,080 KB
testcase_16 AC 74 ms
75,844 KB
testcase_17 AC 78 ms
78,308 KB
testcase_18 AC 82 ms
81,164 KB
testcase_19 AC 83 ms
81,784 KB
testcase_20 AC 84 ms
82,692 KB
testcase_21 AC 81 ms
80,704 KB
testcase_22 AC 85 ms
83,984 KB
testcase_23 AC 83 ms
80,360 KB
testcase_24 AC 86 ms
82,792 KB
testcase_25 AC 83 ms
80,200 KB
testcase_26 AC 79 ms
80,744 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+1] + dp[i]) % mod
    if i + N <= M:
        dp[i+N] = (dp[i+N] + dp[i]) % mod

print(dp[M])
0