Numbers with repeated digits
Your task
Given a positive integer n, return the count of integers in the inclusive range [1, n] that have at least one repeated digit. For example for n = 20 only the number 11 qualifies, so the answer is 1. 1 <= n <= 1000000000.
Examples
num_dup_digits_at_most_n(n: int) -> intExample 1
Input
num_dup_digits_at_most_n(20)Output
1