The sum of all the numbers that can be formed by writing all the digits 3, 2, 3, 4 only once is
The number of numbers having 2 in unit’s place
(because the other three places are to be filled by 3, 3, 4 of which two are identical).
The number of numbers having 3 in unit’s place = 3!, (because the other three places are to be filled by 2, 3, 4).
The number of numbers having 4 in unit’s place , (because the other three places are to be filled by 3, 2, 3 of which two are identical)
∴ Sum of the digits in unit’s place
.
Similarly, the sum of the digits in other places is 36 each.
∴ Required sum = 36 × 1000 + 36 × 100 + 36 × 10 + 36 × 1
= 36 (1000 + 100 + 10 +1) = 36 × 1111 = 39996.