AgodaOA #4
Unique Digits in Range
估计简单可在线判题
Given the closed interval [a,b], count the integers whose decimal representation has no repeated digit. The number 0 also counts as a valid integer.
The original rules are clear; this site adds the handling of zero, the upper bound and the standard input/output.
输入格式
One line with two integers a b (0≤a≤b≤10^18).
输出格式
Output the number of integers in the interval whose decimal digits are all distinct.
样例 1
输入:
5 11
输出:
6
样例 2
输入:
0 0
输出:
1
样例 3
输入:
98 102
输出:
2