結果

問題 No.1186 長方形の敷き詰め
ユーザー mkawa2mkawa2
提出日時 2020-08-22 16:06:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 816 ms / 2,000 ms
コード長 917 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 49,976 KB
最終ジャッジ日時 2024-04-23 10:20:15
合計ジャッジ時間 6,152 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,880 KB
testcase_01 AC 36 ms
10,880 KB
testcase_02 AC 487 ms
18,740 KB
testcase_03 AC 31 ms
11,008 KB
testcase_04 AC 31 ms
11,008 KB
testcase_05 AC 32 ms
10,880 KB
testcase_06 AC 32 ms
10,880 KB
testcase_07 AC 32 ms
10,880 KB
testcase_08 AC 32 ms
10,880 KB
testcase_09 AC 31 ms
10,880 KB
testcase_10 AC 32 ms
10,880 KB
testcase_11 AC 33 ms
10,880 KB
testcase_12 AC 36 ms
10,880 KB
testcase_13 AC 41 ms
10,880 KB
testcase_14 AC 35 ms
10,880 KB
testcase_15 AC 34 ms
10,880 KB
testcase_16 AC 34 ms
11,008 KB
testcase_17 AC 199 ms
13,440 KB
testcase_18 AC 345 ms
15,948 KB
testcase_19 AC 375 ms
16,868 KB
testcase_20 AC 424 ms
17,664 KB
testcase_21 AC 310 ms
15,612 KB
testcase_22 AC 816 ms
49,976 KB
testcase_23 AC 439 ms
32,640 KB
testcase_24 AC 529 ms
28,540 KB
testcase_25 AC 303 ms
17,536 KB
testcase_26 AC 320 ms
15,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
import sys

sys.setrecursionlimit(10 ** 6)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

md=998244353
n,m=MI()
if n==1:
    print(1)
    exit()
dp=[0]*(m+1)
dp[0]=1
for i in range(m):
    if i+1-n>=0:dp[i+1]=dp[i]+dp[i+1-n]
    else:dp[i+1]=dp[i]
    dp[i+1]%=md
print(dp[-1])
0