There is a phone number with $10$ digits. What's the probability that each digit occurs exactly once?
This is a task of an old exam and I'm curious if my solution is correct.
So we have a phone number made up of $10$ digits. Any number between $0$ and $9$ can occur as a digit. Thus in total we have $10^{10}$ combinations. But we want that each digit occurs exactly once. Since we have length $10$ with $10$ different numbers, there are $10!$ different possibilities of arranging those numbers (where each number occurs exactly once).
What we need to do is $10^{10}-10!$
Thus the probability that each digit occurs exactly once in a phone number of length $10$ is $$\frac{1}{10^{10}-10!}$$
?
By the way, it took me about $15$ minutes to get to that solution and in the exam I got like $5$ minutes for one task.. :p
I hope it's correct at least?