Hi, for a range of integers, how can we know thenumber ofintegers in that range(both inclusive) which areNOTdivisible by either of numbers in a given set ?

E.g if we have a range 100 to 1000 and the given set of integers is 4,9,14,19,24 then thenumber ofintegers in 100 - 1000 (both inclusive) which are NOT divisible by either of the integers in the given set is 543. I tried to solve it using set theory i.e:

let sum = (1000- (1000/4+1000/9+1000/14+1000/19+1000/24)) + (100-(100/4+100/9+100/14+100/19+100/24))

then ans = 1000-100-sum

but am not getting correct answer.

Thanks.