Upload Rate
Mediumbinary search
A tournament server must upload every replay before the next round starts in hours hours. sizes lists each replay's size in megabytes. The server uploads at a fixed rate of r megabytes per hour, one replay at a time, and a replay that finishes early still uses its whole last hour (so a replay of size s takes ceil(s / r) hours).
Return the smallest whole-number rate r that uploads everything within hours. You may assume hours is at least the number of replays.
Examples
Input: sizes = [30,11,23,4,20], hours = 6
Output: 23
Input: sizes = [30,11,23,4,20], hours = 5
Output: 30