Problem: How many 5-digit numbers have distinct digits and are divisible by 3?
My direction: I have tried to find all numbers with 5 digits that are divisible by 3 (30000 numbers) and then I will subtract from it numbers that do not have 5 distinct digits but I can't find it.
Hint: first consider how many numbers there are between $10 \, 000$ and $99 \, 999$ such that all of the digits are distinct. The first digit is between $1$ and $9$, so there are $9$ possible choices. Then, there are $9$ choices for the second digit, $8$ choices for the third digit, etc.