# Number of ways a 4 digit number can be formed using the given digits which are divisible by 2 and 5

$\text{S} = \{0,2,4,6,8\}$. If four numbers are selected from $\text{S}$ and a four digit number ABCD is formed, then the number of such numbers which are divisible by $2$ and $5$ (all digits are not different) is?

My Attempt:

Since the numbers so formed are divisible by $2$ and $5$, they will be divisible by $10$. That means the last digit must be $0$.

Now, for the first digit, zero cannot be taken cause the digit so formed will not be a $4$ digit number. Therefore I have $4$ choices.

For the other two, I can choose anyone from the given $5$ digits.

So, my final answer should be $4 \cdot 5 \cdot 5 = 100$

However, this is a wrong answer.

The correct answer given in my book is $76$.

Any help would be appreciated.

• You say that this is given to be a wrong answer. This implies that you may have access to the correct answer. What is the given correct answer then, so that we can identify ambiguities in the wording of the question or possible typos. Could it possibly be that it is intended to have all digits different as opposed to "all digits are not different" (which is a very unusual phrasing in the first place)? Commented Mar 15, 2018 at 20:26
• All digits are not different could be interpreted to mean that at least two of the digits are the same. Commented Mar 15, 2018 at 20:30
• The phrase "all digits are not different" could be interpreted as meaning every digit is the same, which leads us to an answer of zero since $0000$ is not a four digit number. "All digits are different" would yield $1\cdot 4\cdot 3\cdot 2 = 24$. "Digits can by anything" yields the calculation you gave of $4\cdot 5\cdot 5=100$. "Not all digits are different" means at least two digits match and would lead us to $100-24=76$. Commented Mar 15, 2018 at 20:30
• @JMoravitz In obtaining an answer of $52$, you did not take into account the restrictions on where $0$ can be located. Commented Mar 15, 2018 at 20:34

They want to make sure that not all digits are different. Thus, out of the $100$ you calculated, you need to subtract those where the digits are all different, of which there are $4 \cdot 3 \cdot 2 = 24$, leaving you with $76$