AMC 10 · 2025 · #12
Grade 7 countingCarlos uses a 4-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 0. How many 4-digit passcodes satisfy these conditions?
Pick an answer.
AMC 10 2025 problem © Mathematical Association of America (MAA AMC). Reproduced for educational use.
Try it yourself first — the explanation is most useful after you’ve attempted it.
Toolkit + CCSS Solution
Understand
Restated: A passcode is an ordered string of $4$ digits, each from $1$ to $9$ (no $0$). Among the four digits, exactly one is even and exactly one is prime; the digit that is even and the digit that is prime may be the same position or different positions. Count how many such passcodes exist.
Givens: The passcode has $4$ positions, and order matters (it is a code, not a set); Every digit is chosen from $1,2,3,4,5,6,7,8,9$ — the digit $0$ is banned; Exactly one of the four digits is even; Exactly one of the four digits is prime; Answer choices: (A) $176$, (B) $192$, (C) $432$, (D) $464$, (E) $608$
Unknowns: The number of $4$-digit passcodes meeting both the 'exactly one even' and 'exactly one prime' conditions
Understand
Restated: A passcode is an ordered string of $4$ digits, each from $1$ to $9$ (no $0$). Among the four digits, exactly one is even and exactly one is prime; the digit that is even and the digit that is prime may be the same position or different positions. Count how many such passcodes exist.
Givens: The passcode has $4$ positions, and order matters (it is a code, not a set); Every digit is chosen from $1,2,3,4,5,6,7,8,9$ — the digit $0$ is banned; Exactly one of the four digits is even; Exactly one of the four digits is prime; Answer choices: (A) $176$, (B) $192$, (C) $432$, (D) $464$, (E) $608$
Plan
Primary tool: #2 Make a Systematic List
Secondary: #12 Draw a Venn Diagram, #7 Identify Subproblems
This is a 'how many ways' count, so Tool #2 (Make a Systematic List) drives it: fix a role for each position, then multiply the independent choices. But before I can count, I must know how 'even' and 'prime' overlap among the digits $1$–$9$, which is exactly a both/neither sorting — Tool #12 (Draw a Venn Diagram). That sorting reveals the trap digit $2$, the one number sitting in the overlap. Because $2$ can satisfy both conditions by itself, the count breaks into cleanly separate scenarios, so Tool #7 (Identify Subproblems) splits on whether a $2$ appears and I add the pieces at the end.
Execute — Answer: D
4.OA.B.4 Step 1 Sort the digits by even and prime
- List the usable digits $1$–$9$ and label each as even or odd, and as prime or not.
- Even digits are $2,4,6,8$; odd digits are $1,3,5,7,9$.
- Prime digits are $2,3,5,7$ (note $1$ is not prime and $9=3\times3$ is not prime).
- Putting both labels together sorts the nine digits into four groups.
💡 Once each digit is tagged 'even?' and 'prime?', the whole problem is just about how many digits land in each tag group.
2.OA.C.3 Step 2 Spot the digit that fills both slots
- The digit $2$ is the only one that is even AND prime, so if a $2$ is used it single-handedly supplies the one required even digit and the one required prime digit at the same time.
- Every other even digit ($4,6,8$) fills only the even slot, every other prime ($3,5,7$) fills only the prime slot, and the neither-digits ($1,9$) fill neither slot.
- This overlap is why the count must be handled in two separate scenarios.
💡 The number in the overlap of the two circles does double duty, so it behaves differently from every other digit.
7.SP.C.8 Step 3 Case 1 — no 2 is used
- With no $2$, the single even digit must come from $\{4,6,8\}$ and the single prime digit must come from $\{3,5,7\}$; these are different positions, and the other two positions must be neither even nor prime, so each is from $\{1,9\}$.
- Count by choosing positions then digits: pick which of the $4$ positions is the even one ($4$ ways) and its value ($3$ ways), pick which of the remaining $3$ positions is the prime one ($3$ ways) and its value ($3$ ways), and fill the last $2$ positions each from $\{1,9\}$ ($2\times2=4$ ways).
💡 Assign one job to each position, then multiply the independent choices.
7.SP.C.8 Step 4 Case 2 — exactly one 2 is used
- A single $2$ already gives exactly one even digit and exactly one prime digit, so nothing else may be even or prime — the other three positions must all be neither, i.e.
- each is $1$ or $9$.
- (Two $2$s would make two evens and two primes, which is not allowed, so there is exactly one $2$.) Choose which of the $4$ positions holds the $2$ ($4$ ways) and fill the other $3$ positions each from $\{1,9\}$ ($2^3=8$ ways).
💡 One lonely $2$ satisfies both rules, so everything else has to be a harmless $1$ or $9$.
7.SP.C.8 Step 5 Add the two scenarios
The two cases (no $2$ / exactly one $2$) never overlap and together cover every valid passcode, so add their counts to get the total.
💡 Separate, non-overlapping cases are combined by simple addition.
4.OA.B.4 List the usable digits $1$–$9$ and label each as even or odd, and as prime or no 2.OA.C.3 The digit $2$ is the only one that is even AND prime, so if a $2$ is used it sin 7.SP.C.8 With no $2$, the single even digit must come from $\{4,6,8\}$ and the single pri 7.SP.C.8 A single $2$ already gives exactly one even digit and exactly one prime digit, s 7.SP.C.8 The two cases (no $2$ / exactly one $2$) never overlap and together cover every Review
Reasonableness: The count is dominated by Case 1's $432$, which is answer choice (C) exactly — that is the tempting wrong answer you get if you forget the digit $2$ can be both even and prime. The extra $32$ passcodes are precisely the ones built from a single $2$ padded with $1$s and $9$s, pushing the true total to $464$, choice (D). The total $464$ is comfortably below the $9^4=6561$ passcodes with no restriction, and well below even $608$, so the size is sensible for such tight 'exactly one' conditions.
Alternative: Tool #16 (Change Focus / Count the Complement) offers a check: instead of positions-first, choose the two special digits first. Pick the even digit's value and position and the prime digit's value and position, being careful that when the even value is $2$ the same position also serves as the prime, and require the remaining positions to be from $\{1,9\}$. Bookkeeping the $2$-overlap the same way reproduces $432+32=464$.
CCSS standards used (min grade 7)
4.OA.B.4Find all factor pairs and recognize multiples; determine prime or composite (Deciding which digits $1$–$9$ are prime ($2,3,5,7$) and which are not ($1$ and $9=3\times3$), so the digits can be sorted correctly.)2.OA.C.3Determine whether a group of objects has an odd or even number (Labeling each digit even or odd and recognizing that $2$ is the unique digit that is both even and prime.)7.SP.C.8Find probabilities of compound events using organized lists, tables, and simulation (Splitting into cases and using the multiplication principle to count arrangements ($432$ and $32$), then adding the disjoint cases to get $464$.)
⭐ Watch for the digit that fits two rules at once ($2$ is even and prime) — split into 'it shows up' vs 'it doesn't', count each, and add.
⭐ Watch for the digit that fits two rules at once ($2$ is even and prime) — split into 'it shows up' vs 'it doesn't', count each, and add.
More like this
Same archetype — closest grade level first.