AMC 10 Step by Step

2019 AMC 10B Problem 14

P11-15~5 minPrint

The base-ten representation for 19!19! is 121,6T5,100,40M,832,H00121,6T5,100,40M,832,H00 , where TT , MM , and HH denote digits that are not given. What is T+M+HT+M+H ?

Log in to save your progress.
Show solution without answering

Key insight

19! ends in three zeros, so H is 0. Then 19! divides evenly by 9 and by 11, and those two digit tests pin down T and M.

Solution

We cannot compute 19!19! by hand quickly, but we know a lot of numbers it divides by. Use that.

Step 1: find HH. Trailing zeros come from factors of 10=2⋅510 = 2 \cdot 5. Among 1,2,…,191, 2, \ldots, 19, the multiples of 55 are 5,10,155, 10, 15, giving three 55s, and there are plenty of 22s. So 19!19! ends in exactly three zeros. The digits end in H00H00, so H=0H = 0.

Step 2: test for 99. 19!19! is a multiple of 99, so its digit sum is a multiple of 99. Add the known digits of 1216T5100408M8320001216T5100408M832000:
1+2+1+6+5+1+0+0+4+0+8+3+2=33,1 + 2 + 1 + 6 + 5 + 1 + 0 + 0 + 4 + 0 + 8 + 3 + 2 = 33,
so the digit sum is 33+T+M33 + T + M. The next multiples of 99 are 3636 and 4545, so T+MT + M is 33 or 1212. (It cannot be 2121, since two digits add to at most 1818.)

Step 3: test for 1111. 19!19! is a multiple of 1111. The test: starting from the right, add every other digit, add the remaining digits, and the two totals must differ by a multiple of 1111. The 1818 digits from the right are
0,0,0,2,3,8,M,0,4,0,0,1,5,T,6,1,2,1.0, 0, 0, 2, 3, 8, M, 0, 4, 0, 0, 1, 5, T, 6, 1, 2, 1.
- Positions 1,3,5,…1, 3, 5, \ldots: 0+0+3+M+4+0+5+6+2=20+M0 + 0 + 3 + M + 4 + 0 + 5 + 6 + 2 = 20 + M.
- Positions 2,4,6,…2, 4, 6, \ldots: 0+2+8+0+0+1+T+1+1=13+T0 + 2 + 8 + 0 + 0 + 1 + T + 1 + 1 = 13 + T.

The difference is (20+M)−(13+T)=7+M−T(20 + M) - (13 + T) = 7 + M - T. For digits this lies between −2-2 and 1616, so it must be 00 or 1111. That gives M−T=−7M - T = -7 or M−T=4M - T = 4.

Step 4: combine.
- If T+M=3T + M = 3: M−T=4M - T = 4 would give M=3.5M = 3.5, and M−T=−7M - T = -7 would give M=−2M = -2. Neither is a digit.
- If T+M=12T + M = 12: M−T=4M - T = 4 gives M=8M = 8, T=4T = 4. (And M−T=−7M - T = -7 gives M=2.5M = 2.5, not a digit.)

So T=4T = 4, M=8M = 8, H=0H = 0, and T+M+H=12T + M + H = 12. (Indeed 19!=121,645,100,408,832,00019! = 121{,}645{,}100{,}408{,}832{,}000.)

The answer is (C) 12\boxed{\textbf{(C)}\ 12}.

Why this works

A factorial divides evenly by every small number, so the divisibility tests you know become equations for the missing digits. One test alone left two possibilities; a second, independent test settled it. Start with the easiest digit (the trailing zeros) to cut down the number of unknowns.

Concise solution

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

Find HH. The factors 5,10,155, 10, 15 contribute three 55s to 19!19!, and there are plenty of 22s, so 1000∣19!1000 \mid 19! and the number ends in three zeros: H=0H = 0.

Divisibility by 9. Since 9∣19!9 \mid 19!, the digit sum is a multiple of 99:
1+2+1+6+T+5+1+0+0+4+0+M+8+3+2+0+0+0=33+T+M.1 + 2 + 1 + 6 + T + 5 + 1 + 0 + 0 + 4 + 0 + M + 8 + 3 + 2 + 0 + 0 + 0 = 33 + T + M.
So T+M≡3(mod9)T + M \equiv 3 \pmod 9, giving T+M=3T + M = 3 or 1212.

Divisibility by 11. Since 11∣19!11 \mid 19!, the alternating digit sum is a multiple of 1111. Reading the 1818 digits from the right, the odd positions hold 0,0,3,M,4,0,5,6,20, 0, 3, M, 4, 0, 5, 6, 2 (sum 20+M20 + M) and the even positions hold 0,2,8,0,0,1,T,1,10, 2, 8, 0, 0, 1, T, 1, 1 (sum 13+T13 + T). Their difference 7+M−T7 + M - T must be a multiple of 1111, so M−T=4M - T = 4 or M−T=−7M - T = -7.

Combine. With T+M=12T + M = 12: M−T=4M - T = 4 gives M=8M = 8, T=4T = 4. With T+M=3T + M = 3, neither M−T=4M - T = 4 nor M−T=−7M - T = -7 yields digits. So T=4T = 4, M=8M = 8, H=0H = 0, and 19!=121,645,100,408,832,00019! = 121{,}645{,}100{,}408{,}832{,}000.

T+M+H=12T + M + H = 12. The answer is (C) 12\boxed{\textbf{(C)}\ 12}.

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.