Interview Q&A / Aptitude

BeginnerQuick answer1 min readUpdated 3 Oct 2026

Pipes A and B fill a tank in 12 and 15 minutes. Pipe C empties it in 20 minutes. If all three are opened together on an empty tank, how long will it take to fill?

SHORT ANSWER

10 minutes. With 60 units of tank: A adds 5, B adds 4, C removes 3 per minute. Net 6 units per minute, so 60/6 = 10 minutes.

Explain it simply

Assign plus signs to pipes that fill and minus signs to pipes that empty, add everything into one net rate, and divide. Choosing the tank size as the LCM of all the times makes every rate a whole number, so you never handle messy fractions.

Example

Question: A fills in 12 min, B in 15 min, C empties in 20 min. All open.

  1. Tank = LCM(12, 15, 20) = 60 units.
  2. A = +5, B = +4, C = -3 units per minute.
  3. Net = 6 units per minute.
  4. Time = 60 / 6 = 10 minutes.

Variation: with only B and C open on an empty tank, the net is 4 - 3 = +1 unit a minute, so it still fills, but takes 60 minutes. Always check the sign of the net rate before dividing.

js
const tank = 60;
console.log(tank / (tank / 12 + tank / 15 - tank / 20)); // Output: 10

What to say in the interview

"I take the tank as 60 units. A and B add 5 and 4 a minute, C removes 3, net 6, so it fills in 10 minutes."

Common mistakes

  • Adding C's rate instead of subtracting it.
  • Taking the tank as 12 x 15 x 20 units, which works but slows you down.

#aptitude#pipes-cisterns

Related questions

Practise more Aptitude questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Aptitude quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.