04 Try it yourself Interactive
Pipe A is the one that gets closed and pipe B stays open throughout. Choose their solo times and the total time the tank must be full in, and each step builds one term of the subtraction. Push the target time outside its feasible window and the solver refuses, with the window printed out.