Given an int n find all positive integers less than n whose digits are all different. Return the total number of such integers.
21
Returns: 19
101
Returns: 90
1001
Returns: 738
1
Returns: 0