Sum of all numbers formed by the given digits The formula for sum of all numbers formed with all the given digits is:

(Sum of digits) (n-1)!(1111....ntimes)


n stands for number of digits.

For ex:
Sum of all numbers formed with 1,2,3 and 4 is 
10 × 3! × 1111 = 66660.

Can anyone figure out how this was derived?
I figured the answer out.

If you fix 1 in the thousands place, all other numbers can be arranged in 3! Ways.

Therefore 1 occurs in thousands place 3! Times. Same for all the numbers. Therefore for thousands place, total sum= 1000(sum) 3!.

But same thing occurs for all other positions. Therefore sum= 1111...×(sum) ×(n-1)!
As total arrangements will be n factorial and there are n numbers.So each no. can occupy a place (n factorial/n) times then to get sum at a particular place value you have to multiply it with that place value and of course the digit. So doing it for all place values will give you a term (1111...n times) and also (sum of all digits in process) plus this all is occuring (n factorial/n) times or n-1 factorial times so take the product and there you get the result.