The number of integers, between 100 and 1000 having the sum of their digits equal to 14, is .
Answer
70
Solution
Write the number as abc with a + b + c = 14 and a 0, and count case by case.
Case (i), all three digits different: the digit sets with sum 14 are
9, 5, 0, 8, 6, 0, 9, 4, 1, 9, 3, 2, 8, 5, 1, 8, 4, 2, 7, 6, 1, 7, 5, 2, 7, 4, 3, 6, 5, 3.
The 8 sets without 0 give 3! = 6 numbers each, i.e. 48, and the 2 sets with 0 give 3! - 2! = 4 numbers each (0 cannot come first), i.e. 8. So case (i) gives 48 + 8 = 56.
Case (ii), two digits equal: 2p + q = 14 with q p gives (p, q) = (3, 8), (4, 6), (5, 4), (6, 2), (7, 0).
The first four give 3!2! = 3 numbers each, i.e. 12, while 7, 7, 0 gives only 770 and 707. So case (ii) gives 12 + 2 = 14.
Case (iii), all three digits equal: 3p = 14 has no integer solution, so 0.
Required number = 56 + 14 + 0 = 70
Answer: 70