AMC 10 Step by Step

2025 AMC 10A Problem 12

P11-15~5 minPrint

Carlos uses a 44 -digit passcode to unlock his computer. In his passcode, exactly one digit is even, exactly one (possibly different) digit is prime, and no digit is 00 . How many 44 -digit passcodes satisfy these conditions?

Log in to save your progress.
Show solution without answering

Key insight

Sort digits 1 to 9 into groups: 2 is even and prime, 4, 6, 8 only even, 3, 5, 7 only prime, 1 and 9 neither. Then count two cases.

Solution

Two rules overlap here (one even digit, one prime digit), so first sort the digits 11 to 99 by which rules they touch.

  1. Sort the digits.
GroupDigitsHow many
even and prime2211
even, not prime4,6,84, 6, 833
prime, not even3,5,73, 5, 733
neither1,91, 922

Remember that 11 is not prime, and 9=3⋅39 = 3 \cdot 3 is not prime.

  1. Split into two cases. The even digit and the prime digit might be the same digit, or two different digits.

3. Case 1: one digit is both even and prime. That digit must be 22. The other three digits can be neither even nor prime, so each is 11 or 99.
- Where does the 22 go? 44 choices.
- Each of the other three spots: 22 choices.
4⋅2⋅2⋅2=32.4 \cdot 2 \cdot 2 \cdot 2 = 32.

4. Case 2: two different digits. One spot has an even digit that is not prime, and another spot has a prime digit that is not even. A 22 cannot appear here, since it would add a second even digit and a second prime digit. The last two spots are 11 or 99.
- Spot for the even digit: 44 choices.
- Spot for the prime digit: 33 choices (any other spot).
- Which even digit (44, 66 or 88): 33 choices.
- Which prime digit (33, 55 or 77): 33 choices.
- The two remaining spots: 2⋅2=42 \cdot 2 = 4 choices.
4⋅3⋅3⋅3⋅4=432.4 \cdot 3 \cdot 3 \cdot 3 \cdot 4 = 432.

5. Add the cases. A passcode either has a 22 (Case 1) or does not (Case 2), so no passcode is counted twice:
32+432=464.32 + 432 = 464.

The answer is (D) 464\boxed{\textbf{(D)}\ 464}.

Why this works

When two conditions overlap, a small table of which items satisfy which condition shows every situation at once. Here it makes clear that 22 is special and that only 11 and 99 can fill the leftover spots. After that, each case is just "choose the spots, then choose the digits" and multiply.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The available digits are 11 through 99. Sort them by the two properties:

  • even and prime: 22 (one digit),
  • even but not prime: 4,6,84, 6, 8 (three digits),
  • prime but not even: 3,5,73, 5, 7 (three digits),
  • neither: 1,91, 9 (two digits).

Exactly one position holds an even digit and exactly one position holds a prime digit. Those two positions may or may not coincide.

One digit does both jobs. That digit must be 22, and the other three digits must be neither even nor prime, so each is 11 or 99. Choose the position of the 22 in 44 ways and fill the rest in 232^3 ways:
4⋅23=32.4 \cdot 2^3 = 32.

Two different positions. One position holds an even non-prime digit (33 choices) and a different position holds a prime non-even digit (33 choices); the other two positions are 11 or 99. Note that 22 cannot appear here, since it would make the even count and the prime count both too large. Choosing the two special positions in order gives 4⋅34 \cdot 3 ways:
(4⋅3)⋅3⋅3⋅22=12⋅36=432.(4 \cdot 3) \cdot 3 \cdot 3 \cdot 2^2 = 12 \cdot 36 = 432.

The two cases are disjoint, so the total is
32+432=464.32 + 432 = 464.

The answer is (D) 464\boxed{\textbf{(D)}\ 464}.

Review in the AoPS books

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.