classSolution: defminEatingSpeed(self,piles: List[int],h:int) ->int: left =1 right =max(piles)defhelper(k:int) ->int: hours =0for pile in piles: hours += pile // kif pile % k >0: hours +=1return hourswhile left < right: k = left + (right - left) //2ifhelper(k)<= h: right = kelse: left = k +1return left