How do I find the sum of all 4 digit numbers formed by using the digits 1, 0, 2 and 3? Conditions:


*

*Repetition of digits is not allowed.

*0 is not allowed in the thousand's place (or else that would make it 3 digit number)
I don't understand how to proceed here, I thought adding the greatest and smallest would give some sort of pattern, but that doesn't work here. Can someone please help?
 A: The number of $4$ digit numbers formed is $3\times 3 \times 2 \times 1= 18$
Now, in the thousands place, each digit (excluding $0$ (not allowed)) $(1,2,3)$ occurs $18/3= 6$ times. 
Now look, $1$ occurs six times in the thousands place so each time one appears we have $3$ choices left for the hundreds place, $(0,2,3)$ Each of these numbers will appear $6/3= 2$ times. 
Same with $2$, if it is in the thousands place $(0,1,3) $ occur 2 times each. 
Summarising, 
$0$ occurs $2+2+2= 6$ times while $(1,2,3)$ occur $4$ times each at the hundreds place. 
Using elementary maths, the required sum is thus: 
$6000(1+2+3)+ 400(1+2+3)+0(6)+ 40(1+2+3)+ 0(6)+ 4(1+2+3)+0(6)= 38664$
A: "1" appears... 
...as a units place digit $4$ times. Therefore "1", when as a unit digit must have contributed $1 \times 10^0 \times 4$ to the sum.
...as a tens place digit $4$ times. Therefore "1", when as a tens digit must have contributed $1 \times 10^1 \times 4$ to the sum.
...as a hundreds place digit, $4$ times. Therefore "1", when as a hundreds place digit must have contributed $1 \times 10^2 \times 4$ to the sum.
...as a thousands place digit, $6$ times. Therefore "1", when as a thousands place digit must have contributed $1 \times 10^3 \times 6$ to the sum.
Hence, contribution of $1$ to the sum is $$4+40+400+6000=6444$$
Continuing this idea for 0,2 and 3 ; Can you take it further?
A: You may think of it as sum of
[All possible $4\;$digit strings using $0,1,2,3$] $-$ [All possible $3\;$ digit numbers using only $1,2,3]$
There are $4!=24$ permutations of $4$ digits, so each digit will appear $24/4 = 6$ times in each column with a column total of $6\;\rightarrow 6\cdot6(10^3+10^2+10^1+10^0) =39,996$
Similarly using only $1,2,3$ each digit will appear $3!/3 = 2$ times, $\rightarrow\;6\cdot2(10^2+10^1+10^0)= 1332$
Finally $39,996 - 1332 = 38,664$
Of course, once the idea is grasped, you could shorten it to $(36\cdot1111)      -(12\cdot111)$
