Question 1136762: How many different positive whole numbers less than 2018 contain only even digits
Found 2 solutions by Boreal, ikleyn: Answer by Boreal(15235) (Show Source):
You can put this solution on YOUR website! 2008/2006/2004/2002/2000. Look for combinations of 8/6/4/2/0. After the first, there are 5 ways to choose the second and five ways to choose the third
888/886/884/882/880
868/866/864/862/860
...
808/806/804/802/800
25 ways for the 800s
25 ways for the 600s
(688/686/684/682/680...608/606/604/602/600/
25 ways for the 400s
25 ways for the 200s
and
25 ways for those <100 as well
130 of them
Alternatively, 5 ways to choose the first, the second, and the third (125) plus the other 5.
Answer by ikleyn(52887) (Show Source):
You can put this solution on YOUR website! .
For simplicity, we can consider all these numbers as 4-digits numbers, by writing leading 0 (zero, or zeroes) to
all one-digit, two-digit and three-digit numbers.
We only need to subtract from this set the number 0 = "0000" at the end, since it is not positive number.
Now we can easy count all such numbers from 0 to 2000:
fixed 0 in the most left position;
any of 5 digits 0, 2, 4, 6, 8 in the hundreds position;
any of 5 digits 0, 2, 4, 6, 8 in the tens position;
any of 5 digits 0, 2, 4, 6, 8 in the ones position.
In all, there are 5*5*5 = 125 numbers, so far.
Subtract "0000" from this set to get 125 - 1 = 124 numbers.
Add 6 numbers 2000, 2002, 2004, 2006, 2008, and you will find the final answer: 124 + 5 = 129 numbers.
ANSWER. 129 numbers.
Solved.
Notice that the answer "130" by @Boreal is close to it, BUT NOT EXACTLY CORRECT :
he forgot to subtract 0 = "0000" from the set.
|
|
|