转移方程:dp[n]=min(dp[n-1]+cost[n-1],dp[n-2]+cost[n-2]) 边界条件:dp[0]=dp[1]=0 class Solution: def minCostClimbingStairs(self , cost: List[int]) -> int: n = len(cost) dp = [0 for _ in range(n+1)] if n<2: return dp[n] for i in range(2, n+1): minm = min(co...