Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given an integer n, return the number of positive integers in the range [1, n] that have at least one repeated digit.
 
Please complete the following python code precisely:
```python
class Solution:
    def numDupDigitsAtMostN(self, n: int) -> int:
```