2. Find the sum of all four-digit numbers in which only the digits $1,2,3,4,5$ appear, and each digit appears no more than once. (8 points)
Solution. Any of these digits appears in any place as many times as the remaining four digits can be distributed among the remaining three places. This number is $4 \cdot 3 \cdot 2=24$. Therefore, the sum of the digits in each of the four places, taken over all four-digit numbers satisfying the conditions of the problem, is $24 \cdot(1+2+3+4+5)=24 \cdot 15=360$, and the sum of the four-digit numbers themselves is $360 \cdot\left(10^{3}+10^{2}+10+1\right)=360 \cdot 1111=399960$.

Answer. 399960.