Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How many nonzero digits are there in the integers from 1 to 1000?
eg 101 = 2 non zero digits
102 = 2 nonzero digits
509 another 2 nonzero digits
500 1 nonzero digit
how many in total?
and the answer is nowhere near 900
3 Answers
- Dragon.JadeLv 78 years ago
Hello,
= = = = = = = = = = = = = = = = = = = =
Consider all one digit numbers:
= = = = = = = = = = = = = = = = = = = =
From 0 to 9 (we might as well include the initial zero since it will logically be eliminated in the result, this will be useful later...)
1, 2, 3, ... and 9
So we obtain a total of 9 non-zero digits.
= = = = = = = = = = = = = = = = = = = =
Consider all two digits numbers:
= = = = = = = = = = = = = = = = = = = =
From 10 to 19, you obviously have 10 times the digit "1" and "all the one digit numbers" above!
So we obtain a total of 10+9=19 non-zero digits.
From 20 to 29, you obviously have 10 times the digit "2" and "all the one digit numbers" above!
So we obtain a total of 10+9=19 non-zero digits.
....
From 90 to 99, you obviously have 10 times the digit "9" and "all the one digit numbers" above!
So we obtain a total of 10+9=19 non-zero digits.
So the total for all two-digits integers is:
19 + 19 + 19 + ... + 19 = 9 × 19 = 171
Adding in the 9 from the one-digit integers:
Number of non-zero digits from 1 to 99 is 171+9=180
= = = = = = = = = = = = = = = = = = = =
Consider all three digits numbers:
= = = = = = = = = = = = = = = = = = = =
From 100 to 199, you obviously have 100 times the digit "1" and "Number of non-zero digits from 1 to 99" above!
So we obtain a total of 100+180=280 non-zero digits.
From 200 to 299, you obviously have 100 times the digit "2" and "Number of non-zero digits from 1 to 99" above!
So we obtain a total of 100+180=280 non-zero digits.
....
From 900 to 999, you obviously have 100 times the digit "9" and "Number of non-zero digits from 1 to 99" above!
So we obtain a total of 100+180=280 non-zero digits.
And logically, you get:
Number of non-zero digits from 100 to 999 is 9×280=2520
Adding in the "Number of non-zero digits from 1 to 99" above:
Number of non-zero digits from 1 to 999 is 2520+280=2800
= = = = = = = = = = = = = = = = = = = =
Then we need to add one "1" digit from 1000 and finally obtain:
= = = = = = = = = = = = = = = = = = = =
Conclusively, the number of non-zero digits from 1 to 1000 is:
2801
Regards,
Dragon.Jade :-)