mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>在显示着数字 <code>startValue</code> 的坏计算器上,我们可以执行以下两种操作:</p>\n\n<ul>\n\t<li><strong>双倍(Double):</strong>将显示屏上的数字乘 2;</li>\n\t<li><strong>递减(Decrement):</strong>将显示屏上的数字减 <code>1</code> 。</li>\n</ul>\n\n<p>给定两个整数 <code>startValue</code> 和 <code>target</code> 。返回显示数字 <code>target</code> 所需的最小操作数。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>startValue = 2, target = 3\n<strong>输出:</strong>2\n<strong>解释:</strong>先进行双倍运算,然后再进行递减运算 {2 -> 4 -> 3}.\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>startValue = 5, target = 8\n<strong>输出:</strong>2\n<strong>解释:</strong>先递减,再双倍 {5 -> 4 -> 8}.\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>startValue = 3, target = 10\n<strong>输出:</strong>3\n<strong>解释:</strong>先双倍,然后递减,再双倍 {3 -> 6 -> 5 -> 10}.\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= x, y <= 10<sup>9</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 138,
|
||||
"likes": 139,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"2 Keys Keyboard\", \"titleSlug\": \"2-keys-keyboard\", \"difficulty\": \"Medium\", \"translatedTitle\": \"\\u53ea\\u6709\\u4e24\\u4e2a\\u952e\\u7684\\u952e\\u76d8\"}]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.8K\", \"totalSubmission\": \"18.8K\", \"totalAcceptedRaw\": 9830, \"totalSubmissionRaw\": 18822, \"acRate\": \"52.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"9.8K\", \"totalSubmission\": \"18.8K\", \"totalAcceptedRaw\": 9837, \"totalSubmissionRaw\": 18833, \"acRate\": \"52.2%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "141",
|
||||
|
Reference in New Issue
Block a user