其他分享
首页 > 其他分享> > MathProblem 14 Four pints of beer problem

MathProblem 14 Four pints of beer problem

作者:互联网

A bartender has a \(3\) pint glass and a \(5\) pint glass. A customer walks in and orders \(4\) pints of beer. Without a measuring cup but with an unlimited supply of beer how does he get \(4\) pints in either glass?

Solution

用 \(3\) 和 \(5\) 的来得到 \(4\)。很经典的问题。

考虑到如何得到 \(4\): \(5-1=4\) 或者 \(3-1=2\). 当我们将 \(5\) 可以拆分为\(3+2\):即将满瓶的 \(5\) 倒入 \(3\) 中,可以得到 \(2\); 将\(3\) 倒掉,将剩余的 \(2\) 倒入小瓶。此时小瓶剩余 \(1\), 这时我们将大瓶倒满,再倒去 \(1ml\) 即可得到 \(4ml\).

标签:14,pints,倒入,MathProblem,glass,beer,小瓶,pint
来源: https://www.cnblogs.com/xinyu04/p/16536266.html