Problem: Find how many 4-digit numbers are divisible by 5.
I started from two facts:
- The number divisible by 5 ends with either 0 or 5.
- The 4-digit number can't start with 0.
Then I calculated how many permutations end with 5 or 0: since there are 4 placeholders, if I put in the last one 0 or 5, there are three left to be filled with any digit, therefore $2 \cdot 10^3=2000$ (I multiplied by two because if the number ends in either $0$ or $5$, there are $3$ placeholders in case of both $0$ and $5$).
So, there are in total $2000$ permutations that end in $0$ or $5$.
Then I calculated how many of them start with 0: since, if we put 0 in the first place, there are 3 placeholders left, and each of them can hold up to 10 digits, and we arrive at the conclusion that there are $10^3=1000$ permutations that start with $0$.
Then I subtracted from the number of permutations that end in $0$ or $5$ the number of permutations that start with $0$: $2000-1000=1000$.
And then I concluded that there $1000$ $4$-digit numbers that are divisible by $5$.
But the solution is actually $1800$, which is arrived at like this: $9 \cdot 10 \cdot 10 \cdot 2=1800$. $9 \cdot 10 \cdot 10$ comes from that that when the last placeholder is filled, there are three placeholders left, each of which can be filled with any of the $10$ digits, except the first one that can't contain $0$. It is multiplied by two for both cases: $5$ in the last placeholder or $0$ in the last placeholder.
Why is the way that I tried incorrect?
Here is your mistake: you use the 'them' to refer to the $2000$ strings that end in a $0$ or $5$, but you proceeded to calculate the number of $4$ digit strings out of all $10,000$ digit strings that start with a $0$.
To see how many out of the $2,000$ ending with a $0$ or $5$ start with a $0$: given that they end with a $0$ or $5$, you only have $2$ possibilities for that last digit, and $10^2$ for the other two, making a total of $200$ out of those $2000$ that start with a $0$