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?


2 Answers 2


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$


  • $\begingroup$ So that will be 952 right? $\endgroup$ Oct 2, 2018 at 14:25
  • $\begingroup$ Yes The answer is 952 but did you understand what I am trying to say? $\endgroup$ Oct 2, 2018 at 14:28
  • $\begingroup$ +1 for clear explanation. This is exactly same as my attempt. $\endgroup$
    – Avinash N
    Oct 2, 2018 at 14:28
  • $\begingroup$ Yeah i got it deepesh. I was trying to solve it without taking different cases. But i got it now. $\endgroup$ Oct 4, 2018 at 13:43
  • $\begingroup$ is it possible that you can accept it as answer and clear the queue $\endgroup$ Oct 6, 2018 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?

  • $\begingroup$ +1 for detailed explanation. $\endgroup$
    – Avinash N
    Oct 2, 2018 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.