Correct Answer: 40 minutes 20 seconds

Pipe A fills the tank at the rate of 40 liters a minute, pipe B at the rate of 30 liters a minute and pipe C drain the tank at the rate of 20 liters a minute.

lf each of them is kept open for a minute in the order A+B-C, then the tank will have 50 liters of water at the end of 3 minutes.

After 13 such cycles, the tank will have \( \Large 13 \times 50 \) = 650 litres of water.

It will take \( \Large 13 \times 3 \) = 39 minutes for the 13 cycles to be completed.

At the end of the 29th minute, Pipe C will be closed and pipe A will be opened.

Pipe A will add 40 more liters to the tank.

Therefore, at the end of the 40th minute, the tank will have 650 + 40 = 690 liters of water.

At the end of the 40th minute, Pipe A will be closed and Pipe B will be opened.

Pipe B will add 30 liters of water in a minute. Therefore, at the end of the 41st minute, the tank will have 690 + 30 = 720 liters of water.

But as the capacity of the tank is only 700 liters, the tank will overflow before Pipe B can complete its 14th cycle. Therefore, Pipe B need not be kept open for a full minute at the end of 40 minutes.

Pipe B needs to add just 10 more liters of water at the end of 40 minutes for which it will take 1/3rd of a minute.

Therefore, the total time taken for the tank to overflow

= 40 minutes + 1/3 of a minute or 40 minutes 20 seconds.