875. Koko Eating Bananas #
#parent

>>Koko Eating Bana

875. Koko Eating Bananas
Medium
Topics
Companies

Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.

Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour.

Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return.

Return the minimum integer k such that she can eat all the bananas within h hours.



Example 1:

Input: piles = [3,6,7,11], h = 8
Output: 4

Example 2:

Input: piles = [30,11,23,4,20], h = 5
Output: 30

Example 3:

Input: piles = [30,11,23,4,20], h = 6
Output: 23



Constraints:

1 <= piles.length <= 104
piles.length <= h <= 109
1 <= piles[i] <= 109



; Guest; 85fedb0a; like ; +cart
Comment #




Clear this field to post a new thread.
ItemAttributes #
attribute value
Checksum: Yes
SHA1 (chain.log): 85fedb0ac388e27d979de39d5667591e290eb871
Next: [declined: #admi
Previous: banana
Sequence: 986
Notarized: 1728441263.36596
File: /txt/b9/c6/b9c64e984c54f10dc6183061c6a460fa1f75c0ab.txt
File: /txt/85/fe/85fedb0ac388e27d979de39d5667591e290eb871.txt
1728441263; 2 KB 1401
Signature: Guest 40F6C9A6A1B70ABC
Signed: 1715534803
Type: txt
Parent: Koko Eating Bana
SHA1 (Perl, Digest::SHA): 85fedb0ac388e27d979de39d5667591e290eb871
Title: 875. Koko Eating Bananas

index_log #
indexing begins
file was organized (moved location, changed filename)
file hash = 85fedb0ac388e27d979de39d5667591e290eb871
file stat: size = 1401; mod time = 1728441263
---
found token: parent, , bd7bf79a060bbca0b83f0f3f39544329ccf534b8
finished finding tokens
tokens found: 1
token: parent; spacer: ; param = bd7bf79a060bbca0b83f0f3f39544329ccf534b8
found parent: bd7bf79a060bbca0b83f0f3f39544329ccf534b8
---
item timestamp: 1728441263.36596
applying: parent
valid: parent
token found: parent
Cart #
Paste
Clear
Add All
PrintedInfo #

Q: When was this page printed?
Printed: November 21 2024 07:17:21.

Q: How old was the page when downloaded?
Age: Fresh!
pollyanna: 9e1f2d6

Q: How can I get a fresher copy?
A: Ask the server to

^
Read ; Write ; Upload ; Image(257) ; Threads(139) ; Settings ; Profile ; Boxes ; Help
Banana Lounge Unofficial Fan Forum
JavaScript #
Notice #
This server is set to ASCII mode.
Some characters may not be printed.
Non-ASCII characters removed during page printing: 66