|
Question 671026: Find the number of positive integers less than 1000 that contains at least one odd digit and at least one even digit.
Answer by AnlytcPhil(1807) (Show Source):
You can put this solution on YOUR website!
To contain at least one odd digit and at least one even digit,
and be less than 1000, a counting integer must have two or three
digits.
Two digit counting numbers:
There are 90 2-digit numbers altogether, because there are
9 ways to choose the first digit and 10 ways to choose the
second digit, and 9×10 = 90
From that 90 we must subtract the number of two-digit numbers
with two even digits. There are 4 ways to choose the first
even digit and 5 ways to choose the second even digit, That's
4×5 or 20 two-digit numbers with both even digits we must subtract
from the 90. That makes 90-20 or 70
From that 70 we must subtract the number of two-digit numbers
with two odd digits. There are 6 ways to choose the first
odd digit and 5 ways to choose the second odd digit, That's
5×5 or 25 two-digit numbers with both odd digits we must subtract
from the 70. That makes 70-25 or 45.
So there are 45 2-digit numbers that have one even and one odd digit.
Three digit counting numbers:
There are 900 three-digit numbers altogether, because there are 9
ways to choose the first digit, 10 ways to choose the second digit,
and 10 ways to choose the third digit.
That makes 9×10×10 = 900
From that 900 we must subtract the number of three-digit numbers
with all even digits. There are 4 ways to choose the first even
digit, 5 ways to choose the second even digit, and 5 ways to
choose the third even digit. That's 4×5×5 or 100 three-digit
numbers with all even digits which we must subtract from the 900.
That makes 900-100 or 800.
From that 800 we must subtract the number of three-digit numbers
with all odd digits. There are 5 ways to choose the first odd
digit, 5 ways to choose the second odd digit, and 5 ways to
choose the third odd digit. That's 5×5×5 or 125 three-digit
numbers with all odd digits which we must subtract from the 800.
That makes 800-125 or 675.
So there are 675 3-digit numbers that contain at least one odd
digit and at least one even digit.
So 45 two-digit numbers plus 675 three-digit numbers = 720.
Answer: 720.
Edwin
|
|
|
| |