Consider the sequence of all positive integers from to . Sort the digits of each number in increasing order. Find the sum of obtained numbers.
Two positive integers and b~(a \le b \le 10^6).
Print the sum of obtained numbers.
Let a = 19, b = 22. The numbers from to are: 19, 20, 21, 22. After sorting the digits in these numbers we get: 19, 02, 12, 22. Their sum equals to 19 + 2 + 12 + 22 = 55.
Example 1