Problem: lamp a flashes every 6 seconds , lamp b flashes every 8 seconds , lamp c flashes every 10 seconds . at a certain instant of time all 3 lamps flash simultaneously . during the period of 6 minutes after that how many times will exactly two lamps flash ? ( please include any flash of exactly two lights which occurs at the 6 minute mark . )
Rationale: 6 minutes is 360 seconds . lamp a and lamp b will flash together every 24 seconds . 360 / 24 = 15 . in the time period , lamp a and lamp b will flash together 15 times . lamp a and lamp c will flash together every 30 seconds . 360 / 30 = 12 . in the time period , lamp a and lamp c will flash together 12 times . lamp b and lamp c will flash together every 40 seconds . 360 / 40 = 9 . in the time period , lamp b and lamp c will flash together 9 times . all three lights will flash together every 2 * 2 * 2 * 3 * 5 = 120 seconds . 360 / 120 = 3 . we have counted these triple flashes three times , so we need to subtract three times the number of times that all three lights flash together . the number of times that exactly two lights flash together is 15 + 12 + 9 - 9 = 27 times . the answer is d .
annotated_formula: subtract(add(add(divide(multiply(6, const_60), lcm(6, 8)), divide(multiply(6, const_60), lcm(6, 10))), divide(multiply(6, const_60), lcm(8, 10))), multiply(divide(multiply(6, const_60), lcm(lcm(6, 8), 10)), 3))