How many -digit positive integers (that is, integers between and , inclusive) having only even digits are divisible by
- A)
- B)
- C)
- D)
- E)
Answer
B
Key insight
Divisible by 5 with an even last digit forces the units digit to be 0; the thousands digit has 4 even choices and each middle digit 5.
Solution
A number is divisible by exactly when its last digit is or . Since every digit must be even, the last digit is forced to be : one choice.
The thousands digit must be even and nonzero: , four choices.
The hundreds and tens digits may be any even digit : five choices each.
By the multiplication principle the count is
The answer is .
Why this works
Digit-counting problems are products of independent choices once each position's restriction is identified. Handle the most restrictive positions first (the last digit here is completely forced), and remember that the leading digit of a -digit number is never .
The trap
Allowing 0 as the leading digit (5 choices, giving 125) or allowing 5 as the last digit (200).
Common mistakes
- Allowing 0 as the leading digit (5 choices, giving 125) or allowing 5 as the last digit (200).
- Using choices for every digit (excluding everywhere), which gives or -type answers.
Techniques
Set up the equation/formula and compute; no special trick needed