Skip to main content

2015 AMC 10A Problem 18

Problem 18 of 25IntermediateNumber TheoryCounting & Probability

Hexadecimal (base-1616) numbers are written using numeric digits 00 through 99 as well as the letters AA through FF to represent 1010 through 15.15. Among the first 10001000 positive integers, there are nn whose hexadecimal representation contains only numeric digits. What is the sum of the digits of n?n?

Answer choices

Show solution

Solution

In hexadecimal, 1000=3E816.1000=3E8_{16}. Pad each shorter representation to three digits with leading zeros. Every numeric-only string from 00016000_{16} through 39916399_{16} is at most 3E816,3E8_{16}, and these are all the possibilities. The first digit has 44 choices, and each of the other two digits has 1010 choices. This gives 41010=4004\cdot10\cdot10=400 strings, including 00016.000_{16}. Excluding zero leaves n=399.n=399. The sum of the digits in 399399 is 21.21. Thus, E is the correct answer.

More practice

Concepts: number base · digits · basic counting

Problem text and solution from the LIVE past-contest archive. See also the AoPS wiki page for community solutions.