Geeks question i cant understand it .If somebody can please explain it.
scientists generated a new virus .So they planned to kill the virus in the lab .The only way to kill the virus is by the electric rod of very high voltage. Since very high voltage is passing through the electric rod, it cuts off some amount of voltage after every X minutes to avoid any type of accident. So the scientists again maximize the voltage intensity of the electric rod after every Y minute. The electric rod gets very high voltage and low voltage instantly. It is known that to kill the virus, scientists have to give K minutes of very high voltage or 2*K minutes of low voltage. how much time they have to give the electric shock to kill the virus by assuming that virus is getting the very high voltage and low voltage evenly. Samplei/p 4 2 7 o/p 7.00 X=4 and Y=2, so in every 2 minute scientists check whether the voltage is low or high. If it is low then they maximize the voltage So for the first 7 minutes voltage is never low and hence the virus will be killed. https://code.sololearn.com/clnzmmla1QPv/