fiirst i have calculated the numbers that are divisible by 2, in that case i have included 0 for unit place
sine when we use 0 on unit place ,the number will be divisible by both 2 and 5 .so while calulating numbers divisible by 5 i just ignored te case when 0 will be at unit place .since that case has already been included in previous case (divisible by 2)
just draw a ven diagram .there are few numbers divisible by 2 ,5 and both..there are actually 500 numbers that are divisible by both 2 and 5 .you are just considering numbers again.thats why your answer come out to be 2000 instead of 1500.
even from the given problem when we consider the
23450 its divisible by both 2 and 5 .you are just considering the number in both cases.
or lets say how many numbers from 0 to 20 are divisible by both 2 or 5 or both
number divisible by 2 =2,4,6,8,10,12,14,16,18,20
divisible by 5= 5,10,15,20
10 n 20 come in both cases u just cant count them twice
i hope u understand it now