If $x$ and $y$ are positive integers such that $x y z=240, x y+z=46$ and $x+y z=64$, what is the value of $x+y+z$?
(a) 19
(b) 20
(c) 21
(d) 24
(e) 36
The correct option is (b).

Solution 1: From $x y z=240$, it follows that $x y=\frac{240}{z}$. Substituting in $x y+z=46$, we get $\frac{240}{z}+z=46$, that is, $z^{2}-46 z+240=0$. The roots of this equation are numbers whose sum is 46 and whose product is 240, and it is easy to verify that these roots are 6 and 40. Therefore, $z=6$ or $z=40$. In a completely analogous manner, substituting $y z=\frac{240}{x}$ in $x+y z=64$ leads us to $x=4$ or $x=60$.

Now, from $x y z=240$, it follows that $y=\frac{240}{x z}$. Since $y$ is an integer, then $x z$ is a divisor of 240. From $x=4$ or $x=60$ and $z=6$ or $z=40$ it follows that the possibilities for $x z$ are

$$
\underbrace{4}_{x} \times \underbrace{6}_{z}=24, \underbrace{4}_{x} \times \underbrace{40}_{z}=160, \underbrace{60}_{x} \times \underbrace{6}_{z}=360, \underbrace{60}_{x} \times \underbrace{40}_{z}=2400
$$

We see that we can only have $x=4$ and $z=6$, because in any other case the product $x z$ is not a divisor of 240. It follows that $y=\frac{240}{x z}=\frac{240}{4 \times 6}=10$, hence

$$
x+y+z=4+10+6=20
$$

Solution 2: Adding $x y+z=46$ and $x+y z=64$, we get

$$
(x+z)(y+1)=(x+z) y+(x+z)=x y+z+x+y z=46+64=110
$$

and we see that $y+1$ is a divisor of 110. Therefore, we have the possibilities

$$
y+1=1,2,5,10,11,22,55 \text { and } 110
$$

that is, $y=0,1,4,9,10,21,54$ and 109. On the other hand, $y$ is a divisor of 240, because $x y z=240$ and, moreover, $y$ is positive, which leaves us with the only possibilities $y=1,4$ and 10. Let's examine each case of $y$.

- If $y=1$, then $110=(x+z)(y+1)=(x+z) \times 2$, therefore, $x+z=55$. Since also $46=x y+z=x+z$, this case $y=1$ is not possible.
- If $y=4$, then $110=(x+z)(y+1)=(x+z) \times 5$, therefore, $x+z=22$. But $240=x y z=4 x z$, therefore, $x z=60$. We can verify (for example, with a list of divisors of 60 or, then, solving the equation $w^{2}-22 w+60=0$) that there are no positive integer values of $x$ and $z$ that satisfy these two conditions $x+z=22$ and $x z=60$. Therefore, this case $y=4$ is also not possible.
- If $y=10$, then $110=(x+z)(y+1)=(x+z) \times 10$, therefore, $x+z=11$. But $240=x y z=10 x z$, therefore, $x z=24$. We can verify (for example, with a list of divisors of 24 or, then, solving the equation $w^{2}-11 w+24=0$) that the only positive integer values of $x$ and $z$ that satisfy these two conditions $x+z=11$ and $x z=24$ are $x=4$ and $z=6$.

Thus, the only possibility is $x=4, y=10$ and $z=6$, with which $x+y+z=20$.