AMC 10 Step by Step

2026 AMC 10B Problem 20

P16-20~6 minPrint

Annie, Bobby, and Casey each receive an integer, not necessarily distinct, from 11 through 10.10. In how many ways can the numbers be given so that their sum is divisible by 7?7?

Log in to save your progress.
Show solution without answering

Key insight

The numbers 1 through 7 have every remainder exactly once, so whenever one person's number comes from 1 to 7, exactly one choice makes the sum a multiple of 7.

Solution

Whether a sum is a multiple of 77 depends only on the remainders of the numbers when divided by 77. So start by writing those remainders down.

number1122334455667788991010
remainder11223344556600112233

Two things to notice:

  • The "small" numbers 11 through 77 have every remainder 0,1,…,60, 1, \ldots, 6 exactly once.
  • The "big" numbers 8,9,108, 9, 10 repeat the remainders 1,2,31, 2, 3.

The key fact. Suppose two of the three numbers are already chosen, and the third must be a small number (11 to 77). Then exactly one choice works. For example, if two of the numbers are 99 and 44, their sum 1313 has remainder 66, so the third number needs remainder 11. Among 11 to 77 only the number 11 has remainder 11, and indeed 9+4+1=149 + 4 + 1 = 14.

Now split into three cases, by who has a big number.

  1. Casey's number is small (11 to 77). Annie and Bobby can have anything: 10⋅10=10010 \cdot 10 = 100 ways. For each of these, exactly one small number for Casey works. That is 100100 ways.
  1. Casey's number is big, and Bobby's is small. Annie has 1010 choices and Casey has 33 choices (88, 99 or 1010). For each of these 3030 ways, exactly one small number for Bobby works. That is 3030 ways.
  1. Casey's and Bobby's numbers are both big. There are only 3⋅3=93 \cdot 3 = 9 ways to pick these two, so check each one. Annie's number can be anything from 11 to 1010. She has 22 choices if she needs remainder 11, 22 or 33, and 11 choice if she needs remainder 44, 55, 66 or 00.

For example, if Bobby has 88 and Casey has 1010, their sum is 1818, with remainder 44. Annie needs remainder 33, so she can have 33 or 1010: two choices. The table shows the number of choices for Annie in all nine cases.

Casey 88Casey 99Casey 1010
Bobby 88sum 1616, Annie needs remainder 55: 11sum 1717, needs 44: 11sum 1818, needs 33: 22
Bobby 99sum 1717, needs 44: 11sum 1818, needs 33: 22sum 1919, needs 22: 22
Bobby 1010sum 1818, needs 33: 22sum 1919, needs 22: 22sum 2020, needs 11: 22

Adding the nine entries: 1+1+2+1+2+2+2+2+2=151 + 1 + 2 + 1 + 2 + 2 + 2 + 2 + 2 = 15 ways.

4. Add the cases. Every way of giving out the numbers is in exactly one case (Casey small; Casey big and Bobby small; both big), so the total is
100+30+15=145.100 + 30 + 15 = 145.

The answer is (E) 145\boxed{\textbf{(E)}\ 145}.

Why this works

A full run of 77 numbers in a row contains each remainder once, so a number chosen from such a run can "fix" the sum in exactly one way. Peeling off the cases where somebody's number comes from 11 to 77 handles 130130 of the ways with no real work, and only the nine leftover cases need to be checked by hand. Use the same idea whenever the range is a little longer than a full set of remainders.

Alternative approach

Count by the actual sum. Three numbers from 11 to 1010 add to at least 33 and at most 3030, so the sum must be 77, 1414, 2121 or 2828.

To count the ways three positive whole numbers add to SS, picture SS dots in a row and choose 22 of the S−1S - 1 gaps to cut the row into three parts: (S−12)\binom{S-1}{2} ways. Then throw out any way that uses a number bigger than 1010.

  • Sum 77: (62)=15\binom{6}{2} = 15 ways. No number can be bigger than 1010.
  • Sum 1414: (132)=78\binom{13}{2} = 78 ways, but some use an 1111 or a 1212. If Annie has 1111, the others add to 33 (22 ways); if she has 1212, the others add to 22 (11 way). That is 33 bad ways for Annie, and the same for Bobby and for Casey: 99 bad ways. So 78−9=6978 - 9 = 69.
  • Sum 2121: Replace each number xx by 11−x11 - x. This is still a number from 11 to 1010, and the new sum is 33−21=1233 - 21 = 12. So the count is the same as for sum 1212: (112)=55\binom{11}{2} = 55, and none of these uses a number above 1010.
  • Sum 2828: The same swap turns this into sum 33−28=533 - 28 = 5: (42)=6\binom{4}{2} = 6 ways.

The total is 15+69+55+6=14515 + 69 + 55 + 6 = 145.

Concise solution

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

Among 1,…,101, \ldots, 10, the numbers 11 to 77 give each remainder on division by 77 exactly once, and 8,9,108, 9, 10 give remainders 1,2,31, 2, 3.

  • Casey in 11 to 77: for each of the 100100 choices for Annie and Bobby exactly one value works. 100100 ways.
  • Casey in {8,9,10}\{8, 9, 10\}, Bobby in 11 to 77: for each of the 10⋅310 \cdot 3 choices for Annie and Casey exactly one value for Bobby works. 3030 ways.
  • Bobby and Casey both in {8,9,10}\{8, 9, 10\}: their sum has remainder 2,3,4,3,4,5,4,5,62, 3, 4, 3, 4, 5, 4, 5, 6 in the nine cases, so Annie needs remainder 5,4,3,4,3,2,3,2,15, 4, 3, 4, 3, 2, 3, 2, 1, which she can get in 1,1,2,1,2,2,2,2,21, 1, 2, 1, 2, 2, 2, 2, 2 ways. 1515 ways.

Total: 100+30+15=145100 + 30 + 15 = 145.

The answer is (E) 145\boxed{\textbf{(E)}\ 145}.

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.