Sum of integers from 1 to 100 that are divisible by 2 is a, by 5 is b and by both 2 and 5 is c. Find the sum of integers which are divisible 2 or 5.
a + b -c
The first circle A has all the numbers which are divisible by 2. Second circle B has all the numbers which are divisible by 5. The common region C has the numbers that are divisible by both the numbers. If we add the number of numbers in A and B, the numbers in C gets added twice. So to find the number of numbers in that figure, we add
the number of numbers in A and B, then subtract number of numbers in C.
i.e., n(A) + n(B) - n(C)
= a + b - c