mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
|
||||
<p>Your penalty is the <strong>maximum</strong> number of balls in a bag. You want to <strong>minimize</strong> your penalty after the operations.</p>
|
||||
|
||||
<p>Return <em>the minimum possible penalty after performing the operations</em>.</p>
|
||||
<p>Return <em>the minimum possible penalty after performing the operations</em>.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [9], maxOperations = 2
|
||||
@@ -27,7 +27,7 @@
|
||||
The bag with the most number of balls has 3 balls, so your penalty is 3 and you should return 3.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [2,4,8,2], maxOperations = 4
|
||||
@@ -37,14 +37,7 @@ The bag with the most number of balls has 3 balls, so your penalty is 3 and you
|
||||
- Divide the bag with 4 balls into two bags of sizes 2 and 2. [2,<strong><u>4</u></strong>,4,4,2] -> [2,2,2,4,4,2].
|
||||
- Divide the bag with 4 balls into two bags of sizes 2 and 2. [2,2,2,<strong><u>4</u></strong>,4,2] -> [2,2,2,2,2,4,2].
|
||||
- Divide the bag with 4 balls into two bags of sizes 2 and 2. [2,2,2,2,2,<strong><u>4</u></strong>,2] -> [2,2,2,2,2,2,2,2].
|
||||
The bag with the most number of balls has 2 balls, so your penalty is 2 an you should return 2.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 3:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> nums = [7,17], maxOperations = 2
|
||||
<strong>Output:</strong> 7
|
||||
The bag with the most number of balls has 2 balls, so your penalty is 2, and you should return 2.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
Reference in New Issue
Block a user