Задачі
Number Permulations
Number Permulations
Two distinct positive integer numbers with decimal notations of the same length are called \textit{similar}, if their decimal notations can be obtained from each other by permuting the digits.
How many numbers from the segment \[\textit{\textbf{l}}, \textbf{r}\] have exactly one similar number in that segment?
\InputFile
The input file contains two integer numbers \textit{\textbf{l}} and \textbf{r} (\textbf{1} ≤ \textit{\textbf{l}} ≤ \textbf{r} ≤ \textbf{10^15}).
\OutputFile
Output one integer number --- the sought amount.
Вхідні дані #1
10 99
Вихідні дані #1
72