A1 How many positive integers less than 1000 are there with the sum of the digits equal to 7?
A1 The number 7 can be written as the sum of three numbers in eight ways: 007, 016, 025, 034, 115, 124, 133, and 223. Each of these possibilities gives a number of possible numbers. For example, 115 gives three numbers: 115, 151, and 511. 034 gives 34, 43, 304, 340, 403, and 430. So 007, 115, 133, and 223 together give 4 * 3 = 12 possible numbers, and 016, 025, 034, and 124 together give 4 * 6 = 24. In total, therefore, 36.