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. )
Choose the correct answer.
A) 24  B) 25  C) 26  D) 27  E) 28
<gadget id="calculator">6 * 60</gadget>
<output>360</output>

<gadget id="calculator">lcm(6, 8)</gadget>
<output>24</output>

<gadget id="calculator">360 / 24</gadget>
<output>15</output>

<gadget id="calculator">lcm(6, 10)</gadget>
<output>30</output>

<gadget id="calculator">360 / 30</gadget>
<output>12</output>

<gadget id="calculator">15 + 12</gadget>
<output>27</output>

<gadget id="calculator">lcm(8, 10)</gadget>
<output>40</output>

<gadget id="calculator">360 / 40</gadget>
<output>9</output>

<gadget id="calculator">27 + 9</gadget>
<output>36</output>

<gadget id="calculator">lcm(24, 10)</gadget>
<output>120</output>

<gadget id="calculator">360 / 120</gadget>
<output>3</output>

<gadget id="calculator">3 * 3</gadget>
<output>9</output>

<gadget id="calculator">36 - 9</gadget>
<output>27</output>

<result>D</result>
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. )
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))
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 .