結果

問題 No.1186 長方形の敷き詰め
ユーザー roarisroaris
提出日時 2020-08-22 16:58:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 87,012 KB
実行使用メモリ 83,940 KB
最終ジャッジ日時 2023-08-05 13:52:51
合計ジャッジ時間 3,255 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
71,060 KB
testcase_01 AC 63 ms
71,376 KB
testcase_02 AC 75 ms
83,748 KB
testcase_03 AC 63 ms
71,040 KB
testcase_04 AC 61 ms
71,336 KB
testcase_05 AC 66 ms
71,380 KB
testcase_06 AC 62 ms
71,212 KB
testcase_07 AC 63 ms
71,416 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 65 ms
75,940 KB
testcase_12 AC 63 ms
75,716 KB
testcase_13 AC 67 ms
75,836 KB
testcase_14 AC 66 ms
76,052 KB
testcase_15 AC 64 ms
75,916 KB
testcase_16 AC 64 ms
75,996 KB
testcase_17 AC 68 ms
78,176 KB
testcase_18 AC 75 ms
80,828 KB
testcase_19 AC 72 ms
81,904 KB
testcase_20 AC 75 ms
82,712 KB
testcase_21 AC 70 ms
80,612 KB
testcase_22 AC 76 ms
83,684 KB
testcase_23 AC 70 ms
80,368 KB
testcase_24 AC 86 ms
82,756 KB
testcase_25 AC 71 ms
80,300 KB
testcase_26 AC 69 ms
80,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
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[M])
0