結果

問題 No.1186 長方形の敷き詰め
ユーザー lemondolemondo
提出日時 2020-08-22 13:57:37
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 181 ms
コンパイル使用メモリ 82,368 KB
実行使用メモリ 67,988 KB
最終ジャッジ日時 2024-04-23 08:23:40
合計ジャッジ時間 2,303 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,952 KB
testcase_01 AC 39 ms
52,528 KB
testcase_02 AC 54 ms
67,988 KB
testcase_03 AC 39 ms
51,752 KB
testcase_04 AC 38 ms
52,880 KB
testcase_05 AC 39 ms
52,192 KB
testcase_06 AC 39 ms
52,536 KB
testcase_07 AC 38 ms
52,956 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 41 ms
58,432 KB
testcase_12 AC 42 ms
58,944 KB
testcase_13 AC 41 ms
58,628 KB
testcase_14 AC 43 ms
59,228 KB
testcase_15 AC 42 ms
59,368 KB
testcase_16 AC 42 ms
59,932 KB
testcase_17 AC 48 ms
61,580 KB
testcase_18 AC 49 ms
63,808 KB
testcase_19 AC 51 ms
65,584 KB
testcase_20 AC 52 ms
64,900 KB
testcase_21 AC 49 ms
63,656 KB
testcase_22 AC 54 ms
67,668 KB
testcase_23 AC 50 ms
62,952 KB
testcase_24 AC 52 ms
67,140 KB
testcase_25 AC 49 ms
63,616 KB
testcase_26 AC 48 ms
63,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, M = mapint()
mod = 998244353

dp = [0]*(M+1)
dp[0] = 1
for i in range(1, M+1):
    dp[i] = dp[i-1]
    if i>=N:
        dp[i] += dp[i-N]
    dp[i] %= mod
print(dp[-1])
0