A digital watch displays hours and minutes with AM and PM. What is the largest possible sum of the digits in the display?
- A)
- B)
- C)
- D)
- E)
Answer
E
Key insight
Make the hour digits and the minute digits as big as possible separately. The hour 9 beats 10, 11 and 12, and the minutes can be 59.
Solution
The hour and the minutes do not affect each other, so make each one as big as possible on its own.
- The hour. Hours go from to . The one-digit hours give digit sums to . The two-digit hours give only , and . So the best hour is , with digit sum .
- The minutes. Minutes go from to . The first digit can be at most and the second at most , and has both. Its digit sum is .
- Put them together. The display is a real time, and its digits add to . No display can beat both parts at once, so is the largest.
The answer is .
Why this works
When a total is made of separate pieces that do not affect each other, make each piece as large as it can be, then check the best pieces can happen together. Be careful that "biggest number" is not the same as "biggest digit sum": is a later hour than , but its digits add to only .
The trap
Assuming the latest-looking time 12:59 is best. Its digits add to only 1 + 2 + 5 + 9 = 17, the wrong choice (A), while 9:59 gives 23.
Concise solution
The hour part and the minute part are independent, so maximize each on its own.
Hours run from to . A one-digit hour contributes its own value, at most ; the two-digit hours , , contribute only , , . So the best hour is , contributing .
Minutes run from to . The tens digit is at most and the ones digit at most , and achieves both, contributing .
The display therefore has digit sum , and nothing larger is possible.
The answer is .
Review in the AoPS books
- Introduction to Number Theory, Chapter 8: Base Numbers
- Introduction to Number Theory, Chapter 9: Base Number Arithmetic
- Introduction to Number Theory, Chapter 6: Special Numbers (§6.5)
Techniques
Consider the largest/smallest element or boundary case