Sort & Search
Numbers from digits
Given nonnegative integer n. Create from all its digits the biggest and then the smallest number. Print the sum of obtained numbers.
For example, for n = 56002 the biggest will be 65200 and the smallest will be 256 (the leading zeros in number 00256 do not count). The resulting sum is 65200 + 256 = 65456.
One integers n (0 ≤ n ≤
Print the sum of the biggest and the smallest numbers, that can be get from n by permutation of its digits.