I encountered this problem:
How many $4$-digit numbers are there that do not have $5$ and have $7$ in the hundreds position? Digits cannot be repeated.
My thinking: first, let's count numbers that do not have $0$. It's going to be $7\cdot 6 \cdot 5$ arrangements. Now, let's count numbers that have $0$ in the tens position. We have two positions open so there are $7 \cdot 6$ arrangements. We get the same number of arrangements for numbers that end with $0$. The total number of arrangements is $7\cdot 6 \cdot 5+ 2\cdot 7 \cdot 6=7\cdot 7 \cdot 6=294$.
However, my friend argues that there are $8$ choices for the last digit, $7$ choices for the tens digits and $6$ choices for the first digit so the total number should be $8\cdot 7 \cdot 6=336$.
I am asking who is right not to prove my friend wrong but to find the truth. Thanks for listening!