You have to make something that takes in one input from a default I/O method (as an integer), and prints out the sum of all the permutations of that number (not necessarily unique)
For example:
10
would return 11
because 10
can have 2 permutations (10
and 01
), and the sum of those two numbers would be 11
202
would have 6 permutations (202
, 220
, 022
, 022
, 202
, 220
), so the sum would be 888
.
The input is positive, and the input can be taken as any type, but your program's output must be a number.
Standard loopholes are not allowed, and as usual, since this is code golf, the shortest answer in bytes wins!