mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 07:21:40 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你 <code>k</code> 枚相同的鸡蛋,并可以使用一栋从第 <code>1</code> 层到第 <code>n</code> 层共有 <code>n</code> 层楼的建筑。</p>\n\n<p>已知存在楼层 <code>f</code> ,满足 <code>0 <= f <= n</code> ,任何从<strong> 高于</strong> <code>f</code> 的楼层落下的鸡蛋都会碎,从 <code>f</code> 楼层或比它低的楼层落下的鸡蛋都不会破。</p>\n\n<p>每次操作,你可以取一枚没有碎的鸡蛋并把它从任一楼层 <code>x</code> 扔下(满足 <code>1 <= x <= n</code>)。如果鸡蛋碎了,你就不能再次使用它。如果某枚鸡蛋扔下后没有摔碎,则可以在之后的操作中 <strong>重复使用</strong> 这枚鸡蛋。</p>\n\n<p>请你计算并返回要确定 <code>f</code> <strong>确切的值</strong> 的 <strong>最小操作次数</strong> 是多少?</p>\n \n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>k = 1, n = 2\n<strong>输出:</strong>2\n<strong>解释:</strong>\n鸡蛋从 1 楼掉落。如果它碎了,肯定能得出 f = 0 。 \n否则,鸡蛋从 2 楼掉落。如果它碎了,肯定能得出 f = 1 。 \n如果它没碎,那么肯定能得出 f = 2 。 \n因此,在最坏的情况下我们需要移动 2 次以确定 f 是多少。 \n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>k = 2, n = 6\n<strong>输出:</strong>3\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>k = 3, n = 14\n<strong>输出:</strong>4\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= k <= 100</code></li>\n\t<li><code>1 <= n <= 10<sup>4</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Hard",
|
||||
"likes": 763,
|
||||
"likes": 766,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"59K\", \"totalSubmission\": \"202K\", \"totalAcceptedRaw\": 59016, \"totalSubmissionRaw\": 201959, \"acRate\": \"29.2%\"}",
|
||||
"stats": "{\"totalAccepted\": \"59.5K\", \"totalSubmission\": \"203K\", \"totalAcceptedRaw\": 59482, \"totalSubmissionRaw\": 203030, \"acRate\": \"29.3%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user