Artificial intelligent assistant

Water Jar Test - How to Solve So the problem is: 'You have an empty 29-quart jar, an empty 3-quart jar, and an unlimited source of water. How do you measure 20 quarts of water?' Well the example answer given was: '29 - 3(3) = 20' Now the next question states: 'You have an empty 21-quart jar, an empty 127-quart jar, and an empty 3-quart jar. How do you measure 100 quarts of water.' The Answer I provided was '127 - (21 + 3(2)) = 100'. Now I don't know whether it's correct or not. So can someone tell me if I got it wrong and if I didn't can you explain what I'm supposed to do? It's really confusing. If no one can help I'll just ask my teacher I guess.

You got it right. You fill the 127-q jar to the brim, pour 21 quarts from it into the 21-q jar (now there are 106 quarts in the 127-q jar), then pour 3 quarts into the 3-q jar (now there are 103 quarts in the 127-q jar), use the water from the 3-q jar to water your garden, then fill that 3-q jar again from the 127-q jar. You're left with 100 quarts in the 127-q jar, 3 quarts in the 3-q jar, 21 quarts in the 21-q jar, and 3 quarts in the garden.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c22ecbedfbb711220b04da4e3152f990