English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need the zeros between 1 and 1,000,000 please

2006-11-13 08:30:46 · 4 answers · asked by Anonymous in Science & Mathematics Mathematics

4 answers

Are we counting the number of times the digit zero appears? For example, would 1,000,000 result in 6 zeroes? If so, you can count the zeroes as follows:

First, count the numbers of the form nnnnnn0... 10, 20, 30, ..., 100, 110, 120, ..., 999990, 1000000. Every 10th number will have this form, so that is 100,000 zeroes in the units place (don't count zero, but do count 1 million).

1,000,000 * 1/10 = 100,000
100,000 - 1 + 1 = 100,000

Next, count nnnnn0n... 100, 101, 102, 103... 109, 200, 201, 202, ... 209, .... 999900, 999901, 999902, ..., 999,999, 1,000,000. This would be 10 out of every hundred numbers, so that is 99,991 zeroes in the tens place. (You don't count 0 to 9), but you do count 1 million.

1,000,000 * 10/100 = 100,000
100,000 - 10 + 1 = 99,991

Next, count nnnn0nn. This would be 100 out of every thousand numbers, but not counting 0 to 99, but counting 1 million. So that is 99,901.

1,000,000 * 100/1000 = 100,000
100,000 - 100 + 1 = 99,901

Next, count nnn0nnn. This would be 1000 out of every ten thousand numbers, but not counting 0 to 999, but counting 1 million. So that is 99,001.

1,000,000 * 1000/10000 = 100,000
100,000 - 1,000 + 1 = 99,001

Next, count nn0nnnn. This would be 10000 out of every hundred thousand numbers, but not counting 0 to 9999, but counting 1 million. So that is 90,001.

1,000,000 * 10000/100000 = 100,000
100,000 - 10,000 + 1 = 90,001

Finally, count n0nnnnn. Without a leading digit, none of the numbers except 1 million would have this pattern:

1,000,000 * 100000/1000000 = 100,000
100,000 - 100,000 + 1 = 1

100,000 + 99,991 + 99,901 + 99,001 + 90,001 + 1 = 488,895
So the answer is that the digit zero appears 488,895 times in the numbers from 1 to 1 million, inclusive.

2006-11-13 08:37:51 · answer #1 · answered by Puzzling 7 · 1 1

488895

If you have Visual Basic (a computer programming language), throw this in there to see for yourself.


Private Sub Command1_Click()
mCount = 0
For x = 1 To 1000000
p = InStr(1, Str(x), "0")
Do Until p = 0
mCount = mCount + 1
p = InStr(p + 1, Str(x), "0")
Loop
Next x
MsgBox mCount
End Sub

The answer above mine counts the zeros of 0000567 as 4 zeros, that is not the case though.

2006-11-13 16:39:44 · answer #2 · answered by Chris M 2 · 1 0

9+18+27+36+45+54=.....

2006-11-13 16:36:41 · answer #3 · answered by im_loosing_my_mind_1985 2 · 0 1

a lot, trust me, definently over 199

2006-11-13 16:32:39 · answer #4 · answered by Anonymous 2 · 0 1

fedest.com, questions and answers