Probability of guessing a PIN-code

Suppose $n$ is repeated. There are 9 other numbers that can occur. And the other digit can occur in 4 possible positions giving $36$ possibilities.

There are $10$ possibilities for $n$ so the total number of combinations with exactly three digits the same is $360$.


There are ten choices for the repeating digt, nine choices for the different digit, and four choices for its position. Hence there are indeed $10\cdot 9\cdot 4=360$ matching PINs.


The way I approached the problem is to break it down into three possibilities. The repeating number from $0,1,...,9$ with ten possibilities. The unique number $0,1,...,9$ excluding the first pic, so nine possibilities. After that the location of the unique number in the combination which can be $1,2,3,4$ for four possibilities.

This gives us $10*9*4 = 360$ different possible combinations which match your conditions.