If I took all the numbers from one to one billion:
- How many of them contain at least one '1'?
- If I wrote them out in one long line, how many 1 digits would there be?
1st part:
200,000,000?
I tried building a pattern:
If from 1 to 10, there are 2 numbers. If from 1 to 100, there are 20 numbers.
So, as I go on, there will be 20,000,000,000 if taken from 1 to 100??
Right?
Well, for the second part, frankly, lazy to solve. Perhaps to long.