Question

We define the digit sum of a non-negative integer to be the sum of its digits. For example, the digit sum of \(123\) is \(1+2+3=6\).

  1. How many positive integers less than \(100\) have digit sum equal to \(8\)?

Let \(n\) be a positive integer with \(n<10\).

  1. How many positive integers less than \(100\) have digit sum equal to \(n\)?

  2. How many positive integers less than \(1000\) have digit sum equal to \(n\)?

  3. How many positive integers between \(500\) and \(999\) have digit sum equal to \(8\)?

  4. How many positive integers less than \(1000\) have digit sum equal to \(8\), and one digit at least \(5\)?

  5. What is the total of the digit sums of the integers from \(0\) to \(999\) inclusive?