mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
update
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
"titleSlug": "koko-eating-bananas",
|
||||
"content": "<p>Koko loves to eat bananas. There are <code>n</code> piles of bananas, the <code>i<sup>th</sup></code> pile has <code>piles[i]</code> bananas. The guards have gone and will come back in <code>h</code> hours.</p>\n\n<p>Koko can decide her bananas-per-hour eating speed of <code>k</code>. Each hour, she chooses some pile of bananas and eats <code>k</code> bananas from that pile. If the pile has less than <code>k</code> bananas, she eats all of them instead and will not eat any more bananas during this hour.</p>\n\n<p>Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return.</p>\n\n<p>Return <em>the minimum integer</em> <code>k</code> <em>such that she can eat all the bananas within</em> <code>h</code> <em>hours</em>.</p>\n\n<p> </p>\n<p><strong>Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> piles = [3,6,7,11], h = 8\n<strong>Output:</strong> 4\n</pre>\n\n<p><strong>Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> piles = [30,11,23,4,20], h = 5\n<strong>Output:</strong> 30\n</pre>\n\n<p><strong>Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> piles = [30,11,23,4,20], h = 6\n<strong>Output:</strong> 23\n</pre>\n\n<p> </p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 <= piles.length <= 10<sup>4</sup></code></li>\n\t<li><code>piles.length <= h <= 10<sup>9</sup></code></li>\n\t<li><code>1 <= piles[i] <= 10<sup>9</sup></code></li>\n</ul>\n",
|
||||
"translatedTitle": "爱吃香蕉的珂珂",
|
||||
"translatedContent": "<p>珂珂喜欢吃香蕉。这里有 <code>N</code> 堆香蕉,第 <code>i</code> 堆中有 <code>piles[i]</code> 根香蕉。警卫已经离开了,将在 <code>H</code> 小时后回来。</p>\n\n<p>珂珂可以决定她吃香蕉的速度 <code>K</code> (单位:根/小时)。每个小时,她将会选择一堆香蕉,从中吃掉 <code>K</code> 根。如果这堆香蕉少于 <code>K</code> 根,她将吃掉这堆的所有香蕉,然后这一小时内不会再吃更多的香蕉。 </p>\n\n<p>珂珂喜欢慢慢吃,但仍然想在警卫回来前吃掉所有的香蕉。</p>\n\n<p>返回她可以在 <code>H</code> 小时内吃掉所有香蕉的最小速度 <code>K</code>(<code>K</code> 为整数)。</p>\n\n<p> </p>\n\n<ul>\n</ul>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入: </strong>piles = [3,6,7,11], H = 8\n<strong>输出: </strong>4\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入: </strong>piles = [30,11,23,4,20], H = 5\n<strong>输出: </strong>30\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入: </strong>piles = [30,11,23,4,20], H = 6\n<strong>输出: </strong>23\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= piles.length <= 10^4</code></li>\n\t<li><code>piles.length <= H <= 10^9</code></li>\n\t<li><code>1 <= piles[i] <= 10^9</code></li>\n</ul>\n",
|
||||
"translatedContent": "<p>珂珂喜欢吃香蕉。这里有 <code>n</code> 堆香蕉,第 <code>i</code> 堆中有 <code>piles[i]</code> 根香蕉。警卫已经离开了,将在 <code>h</code> 小时后回来。</p>\n\n<p>珂珂可以决定她吃香蕉的速度 <code>k</code> (单位:根/小时)。每个小时,她将会选择一堆香蕉,从中吃掉 <code>k</code> 根。如果这堆香蕉少于 <code>k</code> 根,她将吃掉这堆的所有香蕉,然后这一小时内不会再吃更多的香蕉。 </p>\n\n<p>珂珂喜欢慢慢吃,但仍然想在警卫回来前吃掉所有的香蕉。</p>\n\n<p>返回她可以在 <code>h</code> 小时内吃掉所有香蕉的最小速度 <code>k</code>(<code>k</code> 为整数)。</p>\n\n<p> </p>\n\n<ul>\n</ul>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>piles = [3,6,7,11], h = 8\n<strong>输出:</strong>4\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>piles = [30,11,23,4,20], h = 5\n<strong>输出:</strong>30\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<strong>输入:</strong>piles = [30,11,23,4,20], h = 6\n<strong>输出:</strong>23\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= piles.length <= 10<sup>4</sup></code></li>\n\t<li><code>piles.length <= h <= 10<sup>9</sup></code></li>\n\t<li><code>1 <= piles[i] <= 10<sup>9</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 271,
|
||||
"likes": 282,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Minimize Max Distance to Gas Station\", \"titleSlug\": \"minimize-max-distance-to-gas-station\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u6700\\u5c0f\\u5316\\u53bb\\u52a0\\u6cb9\\u7ad9\\u7684\\u6700\\u5927\\u8ddd\\u79bb\"}]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"62.5K\", \"totalSubmission\": \"128.3K\", \"totalAcceptedRaw\": 62493, \"totalSubmissionRaw\": 128288, \"acRate\": \"48.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"66.7K\", \"totalSubmission\": \"136.5K\", \"totalAcceptedRaw\": 66700, \"totalSubmissionRaw\": 136495, \"acRate\": \"48.9%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "60",
|
||||
|
Reference in New Issue
Block a user