What is the sum of those eight-digit numbers that consist only of the digits 1, 2, 3, 4, 5, 6, 7 and contain each of them at least once?
The numbers we are looking for can be formed by selecting the single digit that appears twice - this can be done in 7 ways - and then arranging the resulting 8 digits in every possible way. The 8! permutations of eight elements are twice the actual number of possibilities, since swapping the two identical digits leads to the same 8-digit number. Thus, there are $7 \cdot \frac{8!}{2}$ 8-digit numbers that consist only of the digits 1, 2, 3, 4, 5, 6, 7 and contain each of these digits at least once.

To calculate the sum of these numbers, consider that for any of the eight possible place values, each digit appears the same number of times in that position, since the digits are not distinguished from each other. Each digit, therefore, appears in $\frac{7 \cdot \frac{8!}{2}}{7} = \frac{8!}{2}$ numbers in the $i$-th position, for $i=1,2,3,4,5,6,7,8$. The sum $S$ of the numbers, calculated by place value, is then

$$
S=\frac{8!}{2}(1+2+3+4+5+6+7)\left(1+10+10^{2}+\ldots+10^{7}\right)=8!14 \cdot \frac{10^{8}-1}{9}
$$

Based on the work of Péter Benczúr (Budapest, Fazekas M. Gyak. Gimn., II. o. t)