結果

問題 No.1186 長方形の敷き詰め
ユーザー NoneNone
提出日時 2021-03-17 04:44:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 207 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 82,324 KB
実行使用メモリ 67,684 KB
最終ジャッジ日時 2024-04-26 13:34:41
合計ジャッジ時間 2,190 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,456 KB
testcase_01 AC 37 ms
52,900 KB
testcase_02 AC 54 ms
67,168 KB
testcase_03 AC 37 ms
52,272 KB
testcase_04 AC 36 ms
52,608 KB
testcase_05 AC 36 ms
52,772 KB
testcase_06 AC 34 ms
53,144 KB
testcase_07 AC 36 ms
51,828 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 41 ms
59,272 KB
testcase_12 AC 42 ms
59,448 KB
testcase_13 AC 41 ms
59,720 KB
testcase_14 AC 41 ms
60,220 KB
testcase_15 AC 41 ms
59,444 KB
testcase_16 AC 42 ms
60,388 KB
testcase_17 AC 46 ms
62,132 KB
testcase_18 AC 48 ms
64,312 KB
testcase_19 AC 50 ms
66,292 KB
testcase_20 AC 49 ms
66,640 KB
testcase_21 AC 47 ms
64,972 KB
testcase_22 AC 52 ms
67,376 KB
testcase_23 AC 51 ms
66,188 KB
testcase_24 AC 56 ms
67,684 KB
testcase_25 AC 53 ms
65,732 KB
testcase_26 AC 48 ms
64,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int, input().split())
MOD=998244353
dp=[0]*(M+2)
dp[0]=1

for i in range(M):
    dp[min(i+1,M+1)]+=dp[i]
    dp[min(i+N,M+1)]+=dp[i]
    dp[min(i+1,M+1)]%=MOD
    dp[min(i+N,M+1)]%=MOD


print(dp[M])
0