MetaOA #29
Count 3 Sister Numbers
估计简单可在线判题
考点(AI 标注)位运算
Count the three-digit integers in a closed range whose hundreds, tens, and ones digits are pairwise different. The 1..10⁹ constraint appended on the original site conflicts with the three-digit statement, so this site follows the explicit three-digit definition and limits the input range to 100..999.
输入格式
One line with left right (100≤left≤right≤999).
输出格式
Output the number of qualifying three-digit integers.
样例 1
输入:
876 890
输出:
3
样例 2
输入:
100 100
输出:
0
样例 3
输入:
102 102
输出:
1
样例说明
Example 1: only 876, 879, and 890 have three distinct digits, so the output is 3.
Example 2: the two 0s in 100 repeat, so the output is 0.
Example 3: the three digits of 102 are all different, so the output is 1.