AMC 10 Step by Step

2004 AMC 10B Problem 2

P1-10~1 minPrint

How many two-digit positive integers have at least one 77 as a digit?

Log in to save your progress.
Show solution without answering

Key insight

It is easier to count the two-digit numbers with no 7 at all (8 choices for the tens digit, 9 for the ones digit) and take them away from 90.

Solution

"At least one 77" could mean a 77 in the tens place, in the ones place, or in both. Rather than juggle those, count the opposite: numbers with no 77 at all.

1. There are 9090 two-digit numbers, from 1010 to 9999.
2. Build a two-digit number with no 77. The tens digit can be 11 to 99 but not 77: that is 88 choices. The ones digit can be 00 to 99 but not 77: that is 99 choices.
3. Every tens choice can go with every ones choice, so there are 8×9=728 \times 9 = 72 numbers with no 77.
4. All the other two-digit numbers have at least one 77:
90−72=18.90 - 72 = 18.

The answer is (B) 18\boxed{\textbf{(B)}\ 18}.

Why this works

When a question says "at least one," the opposite ("none") is often a simple multiplication, because each digit is chosen on its own. Counting directly means you have to watch for numbers that fit two ways at once, here the number 7777.

Alternative approach

Count directly, but watch for the overlap.

  • The numbers 70,71,…,7970, 71, \ldots, 79 have a 77 in the tens place: 1010 numbers.
  • The numbers 17,27,…,9717, 27, \ldots, 97 have a 77 in the ones place: 99 numbers.
  • The number 7777 is on both lists, so it was counted twice. Take one copy away: 10+9−1=1810 + 9 - 1 = 18.
Concise solution

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

"At least one 77" is easiest to handle through its opposite, "no 77 anywhere."

There are 9090 two-digit numbers (1010 through 9999). To build one that avoids the digit 77: the tens digit can be any of 11–99 except 77, which is 88 options, and the units digit can be any of 00–99 except 77, which is 99 options. That gives 8⋅9=728 \cdot 9 = 72 numbers with no 77.

Everything else contains a 77:
90−72=18.90 - 72 = 18.

The answer is (B) 18\boxed{\textbf{(B)}\ 18}.

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.