A new subdivision is being constructed along a long road with hundreds of houses.
The houses are all numbered in order starting with the number 1, so they proceed 1, 2, 3, 4, 5 ... down the long road.
All of the people go to the hardware store to buy numbers for their mailbox, and they line up in order at the counter.
The store, unfortunately, has only 100 of each digit available.

Which homeowner will be the first who cannot buy the complete number for his mailbox?

Solution to the Problem:


The person in house #163 will be the first not to be able to obtain those digits.

For the numbers 1-99, there are 20 of each digit 1-9 and 9 zeroes used.
For 100-199, there will be 120 ones used, 11 zeroes, and 20 of each other digit.

The first digit to run out, then, will be 1. From 100-119, there are 32 '1' digits used; 20 in the hundreds place, 10 in the tens place, and two in the ones place.
For each 10 numbers after that (until we get to 200, of course), there will be 11 ones used.

That said, we need to find out what number would use the hundred-and-first '1' digit (and thus be unable to buy his complete mailbox number).

From 1-119 we have established that 52 will be used, meaning there are 48 left, and every ten subsequent numbers will require the use of eleven '1' digits.
So, 40 numbers later, 44 more of the ones will have been used; or, after the residents of house number 159 buy their numbers, a total of 52+44=96 have been used, leaving only four.
After the people in house 160 purchase theirs, there are three left; after 161, only one, and the lucky homeowners of house number 162 take the very last digit number 1.

Therefore, the first who cannot buy the complete number live in house #163.



Correctly solved by:

1. Davit Banana Istanbul, Turkey
2. Rob Miles Northbrook, Illinois, USA
3. Colin (Yowie) Bowey Beechworth, Victoria, Australia
4. Ivy Joseph Pune, Maharashtra, India
5. Kamal Lohia Hisar, Haryana, India
6. Seth Cohen Concord, New Hampshire, USA
7. Carlos de Armas Barcelona City, Spain