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?
(In reply to
The solution?? by Vee-Liem Veefessional)
for part 1, it's definitely not 20,000,000,000. For example, from
1 to 1,000, there are 272 numbers that contain at least one 1's.
I agree with the rest of the people's solutions..
I got the following formula for part 1:
for any positive integer n, there are
10ⁿ(1-.9ⁿ)+1
numbers from 1 to 10ⁿ that contains at least one digit of 1.
i hope i am doing this right.. o_O"