Both of your calculations are wrong. For the no repetition case, you also need to multiply by 10, since there are 10 different ways that that could occur (10 unique possible first numbers). The calculation for at most 1 repeat is also fucked up. I'm too lazy to do the latter case analytically but I wrote a script to…