How many numbers from 1 to 100 are not divisible by either 2 or 4 or 5...
Let us first understand the meaning of the statement given in the question—
It is given that the numbers are from 1 to 100, so while counting we will include both the limits, i.e., 1 and 100. Had this been “How many numbers in between 1 to 100 are..." then we would not have included either 1 or 100.
Now to solve this question, we will first find out the number of numbers from 1 to 100 which are divisible by either 2 or 5 (since all the numbers which are not divisible by 2 will not be divisible by 4 also, so we do not need to find the numbers divisible by 4). And then we will subtract this from the total number of numbers i.e., 100. It can be seen below:
Total number of numbers = numbers which are divisible + numbers which are not divisible
So, n(2U5) = n(2) + n(5) - n (2∩5)
Now, n(2) = 50
n(5) = 20
n(2∩5) = 10
n(2U5) = 50 + 20 - 10 = 60
Numbers which are not divisible = total number of numbers-numbers which are divisible
=100 - 60 = 40
View all questions of this test
How many numbers from 1 to 100 are not divisible by either 2 or 4 or 5...
Solution:
Numbers from 1 to 100 are 1, 2, 3, …, 99, 100.
Numbers divisible by 2 are 2, 4, 6, …, 98, 100.
Numbers divisible by 4 are 4, 8, …, 96, 100.
Numbers divisible by 5 are 5, 10, 15, …, 95, 100.
Numbers divisible by both 2 and 4 are 4, 8, …, 96, 100.
Numbers divisible by both 2 and 5 are 10, 20, …, 100.
Numbers divisible by both 4 and 5 are 20, 40, 60, 80, 100.
Numbers divisible by 2, 4 and 5 are 20, 40, 60, 80, 100.
Total numbers divisible by 2 or 4 or 5 are 49 + 24 + 19 - 12 - 9 - 4 + 1 = 70.
Therefore, the required answer is 100 - 70 = 30.
Hence, the correct option is (B) 40.