digits. Count the integers x with 0 ≤ x < 10^digits whose decimal form has no repeated digits, meaning each digit appears at most once.
Numbers are written the usual way, without leading zeros.digits=1 → 10
The numbers 0 through 9 are single digits with nothing to repeat: 10 of them.
digits=2 → 91
Among 0 to 99, only 11, 22, ..., 99 repeat a digit, which leaves 100 − 9 = 91.
digits=0 → 1
digits=1
10
Run checks the first 3 tests in your browser. Submit checks all 12 tests on the server, hidden ones included.