其他分享
首页 > 其他分享> > MathProblem 25 Guess the age problem

MathProblem 25 Guess the age problem

作者:互联网

Person x and y have the following conversation:

x: I forgot how old your three kids are.
y: The product of their ages is 36.
x: I still don't know their ages.
y: The sum of their ages is the same as your house number.
x: I still don't know their ages.
y: The oldest one has red hair.
x: Now I know their ages!

How old are they?

Solution

假设年纪从小到大依次是 \(a,b,c\),由第一个条件,我们知道:

\[a\cdot b\cdot c = 36 \]

由此可以列出所有的可能:

\[1*2*18\\ 1*3*12\\ 1*4*9\\ 1*6*6\\ 2*2*9\\ 2*3*9\\ 3*3*4 \]

第二个问话说明 \(a+b+c\) 不是唯一值,所以只剩下 \(1*6*6, 2*2*9\)

最后的问句则是透露,最大值只有一个,所以答案为 \(2*2*9\)

标签:25,Guess,old,ages,MathProblem,their,know,still,your
来源: https://www.cnblogs.com/xinyu04/p/16581889.html