結果

問題 No.1186 長方形の敷き詰め
ユーザー lemondolemondo
提出日時 2020-08-22 14:21:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 341 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 82,032 KB
実行使用メモリ 66,200 KB
最終ジャッジ日時 2024-04-23 08:41:59
合計ジャッジ時間 1,994 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,628 KB
testcase_01 AC 32 ms
53,084 KB
testcase_02 AC 47 ms
65,988 KB
testcase_03 AC 34 ms
51,872 KB
testcase_04 AC 34 ms
52,344 KB
testcase_05 AC 33 ms
53,252 KB
testcase_06 AC 36 ms
53,488 KB
testcase_07 AC 33 ms
52,700 KB
testcase_08 AC 34 ms
52,688 KB
testcase_09 AC 41 ms
59,896 KB
testcase_10 AC 35 ms
52,916 KB
testcase_11 AC 37 ms
59,956 KB
testcase_12 AC 40 ms
58,152 KB
testcase_13 AC 38 ms
58,748 KB
testcase_14 AC 37 ms
59,028 KB
testcase_15 AC 39 ms
58,432 KB
testcase_16 AC 39 ms
58,912 KB
testcase_17 AC 40 ms
61,092 KB
testcase_18 AC 44 ms
63,864 KB
testcase_19 AC 45 ms
64,572 KB
testcase_20 AC 46 ms
66,200 KB
testcase_21 AC 42 ms
64,580 KB
testcase_22 AC 51 ms
66,188 KB
testcase_23 AC 48 ms
64,108 KB
testcase_24 AC 46 ms
65,960 KB
testcase_25 AC 44 ms
64,416 KB
testcase_26 AC 43 ms
62,788 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
if N==1:
    print(1)
    exit()
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