2020 AMC 10A Problem 6
How many -digit positive integers (that is, integers between and , inclusive) having only even digits are divisible by
Show solution without answering
Key insight
The last digit must be 0 (even and divisible by 5). The first digit has 4 choices, since it cannot be 0, and each middle digit has 5.
Solution
Count digit by digit, starting with the digit that has the strictest rule.
1. Last digit. A number is divisible by when its last digit is or . The digit must also be even, and is odd. So the last digit must be : choice.
2. First digit. It must be even, and a -digit number cannot start with . So it is , , or : choices.
3. Second and third digits. Each can be any even digit : choices each.
4. The choices do not affect each other, so multiply:
For example, , and are all counted.
The answer is .
Why this works
When each digit's choices do not depend on the others, the total count is the product of the number of choices for each digit. Settle the most restricted spots first (here the last digit is forced), and always remember that the first digit of a number cannot be .
Concise solution
A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.
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 .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 1: Integers: The Basics (§1.4, §1.5)
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques
Similar problems
Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.