first to last inclusive. Tickets are sorted into bins: a ticket goes to the bin whose number equals the sum of the digits of the ticket number. For instance, ticket 405 goes to bin 4 + 0 + 5 = 9.
There are as many bins as needed. Return how many tickets end up in the fullest bin.first=8, last=17 → 2
The digit sums are 8, 9, 1, 2, 3, 4, 5, 6, 7, 8. Bin 8 gets two tickets, 8 and 17; every other bin gets one.
first=100, last=100 → 1
A single ticket, alone in bin 1.
first=1, last=30 → 4
first ≤ last ≤ 10⁵first=8, last=17
2
Run checks the first 3 tests in your browser. Submit checks all 86 tests on the server, hidden ones included.