How many positive integers less than 1000 have digits that add up to 10?
Type in the answer (TITA): no options.
Show answer & solution
Correct answer: 63
Solution: Write each number as a three-digit string abc with leading zeros allowed (0 itself has digit sum 0, so it is not counted). We need a + b + c = 10 with each digit 0 to 9. Without the upper limit there are C(12, 2) = 66 solutions; the ones with a digit equal to 10 (10, 0, 0 in some order) are not allowed, and there are 3 of them. 66 − 3 = 63.