Pipe A can fill a cistern in 30 minutes, while the pipe B can fill it in 20 minutes. They are alternately open for 1 minute. How long will it take the cistern to fill completely?
Let the total time taken be 2x minutes. Both X and Y run for x mins. So $(x/20 + x/30)$ = 1. Solving for x, we get x = 12, which gives 2x = 24.