mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>数组的每个下标作为一个阶梯,第 <code>i</code> 个阶梯对应着一个非负数的体力花费值 <code>cost[i]</code>(下标从 <code>0</code> 开始)。</p>\n\n<p>每当爬上一个阶梯都要花费对应的体力值,一旦支付了相应的体力值,就可以选择向上爬一个阶梯或者爬两个阶梯。</p>\n\n<p>请找出达到楼层顶部的最低花费。在开始时,你可以选择从下标为 0 或 1 的元素作为初始阶梯。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>cost = [10, 15, 20]\n<strong>输出:</strong>15\n<strong>解释:</strong>最低花费是从 cost[1] 开始,然后走两步即可到阶梯顶,一共花费 15 。\n</pre>\n\n<p><strong> 示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>cost = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]\n<strong>输出:</strong>6\n<strong>解释:</strong>最低花费方式是从 cost[0] 开始,逐个经过那些 1 ,跳过 cost[3] ,一共花费 6 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>2 <= cost.length <= 1000</code></li>\n\t<li><code>0 <= cost[i] <= 999</code></li>\n</ul>\n\n<p> </p>\n\n<p><meta charset=\"UTF-8\" />注意:本题与主站 746 题相同: <a href=\"https://leetcode-cn.com/problems/min-cost-climbing-stairs/\">https://leetcode-cn.com/problems/min-cost-climbing-stairs/</a></p>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 34,
|
||||
"likes": 35,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -150,7 +150,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"13K\", \"totalSubmission\": \"17.6K\", \"totalAcceptedRaw\": 13033, \"totalSubmissionRaw\": 17648, \"acRate\": \"73.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"13.3K\", \"totalSubmission\": \"17.9K\", \"totalAcceptedRaw\": 13257, \"totalSubmissionRaw\": 17936, \"acRate\": \"73.9%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
||||
Reference in New Issue
Block a user