The number of integers lying between 1000 and 10000 such that the sum of all the digits in each of those numbers becomes 30 is
Show Hint
When the required sum of digits is "high" (close to the maximum sum), transform the variables by letting \( y_i = (\text{max digit}) - d_i \). This flips the problem to a "low sum" problem, often removing the need to use the Principle of Inclusion-Exclusion for upper bounds.