# How many 4 digit numbers can be formed from digits 0 to 9 without repetition which are divisible by 5?

I am trying to find out the number of 4 digit numbers formed from digits 0 to 9 without repeating any digit which are divisible by 5? But dont know how to do it as if last digit ends with digit 0 then there will be 9 possible digits at first place(excluding 0).. But if last digit ends with digit 5 then there will be 8 possible digits at first place(excluding 0 and 5) So how to do it in easiest way?

First case when the last digit is 0

now you don't want repetition thus possible numbers of 4 digit numbers divisible by 5 is $$9*8*7$$

Now the second case when the last digit is 5 but we also want the first digit should be non-zero

Thus filling the first place we have only 8 choices because we exclude zero

for second place we also have 8 choices

now for third place, we have 7 choices

Thus for second case total $$=8*8*7$$

$$\text{Total}=9\cdot8\cdot7+8\cdot8\cdot7=56\cdot17=952$$

• So that will be 952 right? – manish thakur Oct 2 '18 at 14:25
• Yes The answer is 952 but did you understand what I am trying to say? – Deepesh Meena Oct 2 '18 at 14:28
• +1 for clear explanation. This is exactly same as my attempt. – Avinash N Oct 2 '18 at 14:28
• Yeah i got it deepesh. I was trying to solve it without taking different cases. But i got it now. – manish thakur Oct 4 '18 at 13:43
• is it possible that you can accept it as answer and clear the queue – Deepesh Meena Oct 6 '18 at 20:01

Work backwards... There are two cases, either the units digit is $$0$$ or $$5$$. If it ends in $$0$$, then the tens digit can be $$1-9$$, 9 possibilities, the hundreds digit can be the remaining $$8$$, and the thousands can be the remaining $$7$$. So the total is $$9\cdot 8\cdot 7$$.

Note then if you start with $$5$$ in the units place, you approach the same way, however, the thousands digit can not be $$0$$ (why?). So the total then is $$8\cdot 8\cdot 7$$.

Now what do you do with both of these numbers?

• +1 for detailed explanation. – Avinash N Oct 2 '18 at 14:31