The correct option is C 22 times, 97
In order to find how many times the alarm rings we need to find the number of numbers below 100 which are not divisible by 2, 3, 5 or 7. This can be found by 100 - (numbers divisible by 2) - (numbers divisible by 3 but not by 2) - (numbers divisible by 7 but not by 2 or 3 or 5).
Numbers divisible by 2 up to 100 would be represented by the series 2, 4, 6, 8, 10 .. 100 → A total of 50 numbers.
Numbers divisible by 3 but not by 2 up to 100 would be reprsented by the series 3, 9, 15, 21 ... 99 finding the number of number in this series:
[(last term - first term)/ common difference] + 1 = [99 - 3)/6] + 1 = 16 + 1 =17.
Numbers divisible by 5 but not by 2 or 3: Numbers divisible by 5 but not by 2 up to 100 would be represented by the series 5, 15, 25, 35 ... 95 → A total of 10 numbers. But from these numbers, the numbers 15, 45 and 75 are also divisible by 3. Thus,
we are left with 10 - 3 = 7 new numbers which are divisible by 5 but not by 2 and 3.
Numbers divisible by 7, but not by 2, 3 or 5:
Numbers divisible by 7 but not by 2 up to 100 would be represented by the series 7, 21, 35, 49, 63, 77, 91 → A total of 7 numbers. But from these numbers, we should not count 21, 35 and 63 as they are divisible by either 3 or 5. Thus a total of 7 - 3 = 4 numbers are divisible by 7 but not by 2, 3 or 5.