there are 76 lights which are functional and each is controlled by a separate on / off switch . two children a and b start playing with the switches . a starts by pressing every third switch till he reaches the end . b , thereafter , presses every fifth switch till he too reaches the end . if all switches were in off position at the beggining , how many lights are switched on by the end of this operation ?
"editing my solution : number of switches = 76 number of switches turned on by a : 3 , 6 , . . . 75 = 25 number of switches turned on by b : 5 , 10 , . . . . 75 = 15 few switches are turned on by a and later turned off by b : lcm ( 3,5 ) = 15 x = 15 , 30 , . . . . 90 = 6 . subtract the above 6 switches from both a and b as they are turned off . number of switches that are turned on = ( 25 - 6 ) + ( 15 - 6 ) = 28 answer : a"
subtract(add(floor(divide(76, const_3)), floor(divide(76, add(const_1, const_4)))), multiply(floor(divide(76, multiply(const_3, add(const_1, const_4)))), const_2))