JPMorgan ChaseOA #35
Count Numbers Without Repeating Digits
估计简单可在线判题
考点(AI 标注)位运算模拟/实现
Count the non-negative integers in a closed range whose decimal digits are all different. 0 is written as the single digit 0 and counts as valid. The original statement is truncated; the rule is restored from the title and the original explanation that 10..13 includes 10, 12, and 13. The non-negative domain and the representation of 0 are an explicit protocol of this site.
输入格式
One line with start end. The original has no numeric bounds; this site uses 0≤start≤end≤10^18.
输出格式
Output a single integer answer.
样例 1
输入:
10 13
输出:
3
样例 2
输入:
0 11
输出:
11
样例 3
输入:
98 102
输出:
2
样例说明
The outputs of the three public examples are, in order: 3; 11; 2. These answers have been checked by independent enumeration or direct simulation.