Answer:
3,360 different codes.
Step-by-step explanation:
Here we have a set of 8 numbers:
{0, 0, 1, 5, 8, 9, 9, 9}
Now we want to make an 8th digit code with those numbers (each number can be used only once)
Now let's count the number of options for each digit in the code.
For the first digit, we will have 8 options
For the second digit, we will have 7 options (because one was already taken)
For the third digit, we will have 6 options (because two were already taken)
you already can see the pattern here:
For the fourth digit, we will have 5 options
For the fifth digit, we will have 4 options
For the sixth digit, we will have 3 options
For the seventh digit, we will have 2 options
For the eighth digit, we will have 1 option.
The total number of codes will be equal to the product between the numbers of options for each digit, then we have that the total number of codes is:
N = 8*7*6*5*4*3*2*1 = 8!
But wait, you can see that the 9 is repeated 3 times (then we have 3*2*1 = 3! permutations for the nines), and the 0 is repeated two times (then we have 2*1 = 2! permutations for the zeros).
Then we need to divide the number of different codes that we found above by 3! and 2!.
We get that the total number of different codes is:
C = 
3,360 different codes.