2064. Minimized Maximum of Products Distributed to Any Store
## 思路
對答案範圍做Binary Search
## Code
```python
class Solution:
def minimizedMaximum(self, n: int, quantities: List[int]) -> int:
res = 0
def check(val):
count = 0
for quantity in quantities:
count += ceil(quantity / val)
if count > n:
return False
return True
left, right = 1, max(quantities)
while left <= right:
mid = (left + right) // 2
if check(mid):
res = mid
right = mid - 1
else:
left = mid + 1
return res
```