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
re: Solutions by Charlie)
The agreement of the two ways is shown by this UBASIC:
?1000000000*(1-.9^9)+1
612579512.0000000002190879977
OK
10 for i=0 to 8
20 t=t+100000000*.9^i
30 next
40 ?t+1
run
612579511.9999999998992483568
OK
Internal rounding results in those differences from integer.
|
Posted by Charlie
on 2004-07-26 10:54:50 |