How many $n$-digit numbers are there such that the sum of the digits is $9n-8$?
The sought number has every digit at least 1, so these numbers can be obtained by reducing some of the digits of the $n$-digit number, which is entirely composed of 9s, such that the sum of the reductions is exactly 8. Thus, every number in question can be uniquely associated with a sequence of natural numbers of length $n$, where the sum of the elements is 8.

We need to determine how many ways there are to decompose 8 into the sum of $n$ non-negative integers, considering different decompositions even if they only differ in the order of the terms.

Let's actually try to create such a decomposition: if an 8-unit long rod is divided into $n$ parts by $n-1$ cuts that pass through all the integer points, then the elements of the sequence are obtained as the lengths of the consecutive segments. Multiple cuts can pass through the same division point, which represents 0-valued elements at the corresponding positions in the sequence.

Since 0 can also appear at the beginning and end of the sequence, cuts passing through the 0 and 8-unit points are also allowed. The task is thus to determine how many ways there are to choose $(n-1)$ points from 9 division points, where the same division point can be chosen multiple times.

As is known, these selections are precisely the 9-element $(n-1)$-class combinations with repetition, and their number is $\binom{9+n-2}{n-1}=\binom{n+7}{n-1}$. This means that there are $\binom{n+7}{n-1}$ $n$-digit numbers where the sum of the digits is $9n-8$.

Tóth 370 Ágnes (Hajdúszoboszló, Hógyes E. Gymn., 11th grade)

Remarks. 1. The number of $n$-length sequences with a sum of 8 can also be determined by other clever reasoning. Paulin Dániel (Fazekas M. Gymn., 9th grade) performed the total 8-unit reduction one by one, specifically by position. According to his reasoning, out of the $n$ positions, one must be chosen 8 times, and the same position can naturally be chosen multiple times. The possibilities are now the 8-class combinations with repetition of $n$ elements, and their number is $\binom{n+8-1}{8}=\binom{n+7}{8}$, which is naturally the same as before.

2. Deák Péter (Fazekas M. Gymn., 9th grade) also counted these selections directly, essentially proving the formula for the number of combinations with repetition. He reasoned as follows: at every position except the last, two actions can be taken: reduce the number at that position by 1, or move to the next position. (When reaching the last position, there is no choice.) Thus, we have a total of $(n-1)+8=n+7$ decision points, and we need to choose 8 of them where we reduce. This can clearly be done in $\binom{n+7}{8}$ ways. (Or, equivalently, $\binom{n+7}{n-1}$ ways to choose the $(n-1)$ moves forward.)