結果

問題 No.1186 長方形の敷き詰め
ユーザー marroncastlemarroncastle
提出日時 2020-08-22 14:47:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 407 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 67,348 KB
最終ジャッジ日時 2024-04-23 09:12:27
合計ジャッジ時間 2,615 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
51,456 KB
testcase_01 AC 34 ms
51,456 KB
testcase_02 AC 61 ms
65,024 KB
testcase_03 AC 35 ms
51,968 KB
testcase_04 AC 34 ms
51,840 KB
testcase_05 AC 33 ms
51,456 KB
testcase_06 AC 40 ms
51,840 KB
testcase_07 AC 36 ms
51,968 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 40 ms
57,600 KB
testcase_12 AC 41 ms
57,600 KB
testcase_13 AC 41 ms
57,984 KB
testcase_14 AC 42 ms
57,728 KB
testcase_15 AC 40 ms
57,472 KB
testcase_16 AC 42 ms
57,600 KB
testcase_17 AC 47 ms
59,904 KB
testcase_18 AC 51 ms
62,208 KB
testcase_19 AC 54 ms
63,616 KB
testcase_20 AC 60 ms
64,384 KB
testcase_21 AC 52 ms
62,336 KB
testcase_22 AC 61 ms
65,280 KB
testcase_23 AC 51 ms
62,336 KB
testcase_24 AC 59 ms
65,280 KB
testcase_25 AC 53 ms
62,592 KB
testcase_26 AC 53 ms
62,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
  mod = 998244353
  N, M = map(int, input().split())
  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
  ans = dp[-1]
  return ans
print(solve())
0