Slowest speed that finishes in time

piles lists how many bananas are in each pile, and you have hours to eat them all. Each hour you pick one pile and eat up to k bananas from it; if the pile has fewer than k left you finish it and the rest of that hour is wasted. Write min_speed(piles, hours) that returns the smallest k that lets you finish within hours. hours is at least len(piles).

min_speed([3, 6, 7, 11], 8)   ->  4
min_speed([30, 11, 23, 4, 20], 5)  ->  30
min_speed([30, 11, 23, 4, 20], 6)  ->  23

The point is to practise binary search on an answer with a helper that checks a guess.

def min_speed(piles, hours):
    ...