1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-10-22 05:26:46 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-03-29 16:56:27 +08:00
parent e730aa6794
commit ad15da05aa
2517 changed files with 7358 additions and 7332 deletions

View File

@@ -12,7 +12,7 @@
"translatedContent": "<p>在显示着数字&nbsp;<code>startValue</code>&nbsp;的坏计算器上,我们可以执行以下两种操作:</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>给定两个整数&nbsp;<code>startValue</code>&nbsp;和&nbsp;<code>target</code>&nbsp;。返回显示数字&nbsp;<code>target</code>&nbsp;所需的最小操作数。</p>\n\n<p>&nbsp;</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 -&gt; 4 -&gt; 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 -&gt; 4 -&gt; 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 -&gt; 6 -&gt; 5 -&gt; 10}.\n</pre>\n\n<p>&nbsp;</p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= x, y &lt;= 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",