2. At the mathematics competition, 140 students participated. For each student, the competition organizer provided one juice box. The juices were packed in boxes of 16, 17, or 40. How many juices were there of each type? Explain!
Solution: Let there be $x$ boxes with 16 juices each, $y$ boxes with 17, and $z$ boxes with 40 juices. Then $16 x+17 y+40 z=140$. Since 16, 40, and 140 are divisible by 4, it follows that $17 y$ is also divisible by 4. But 4 is not a divisor of 17, so we conclude that 4 is a divisor of $y$, i.e., $y=4 k$. Then $16 x+17 \cdot 4 k+40 z=140 /: 4 ; 4 x+17 k+10 z=$ 35. Clearly, $k=1$, because for $k \geq 2$ we would have $4 x+10 z \leq 1$, which is not possible, since $x, z \in \mathrm{N}$, so $k=1$ and $4 x+10 z=18$, i.e., $2 x+5 z=9$. The last equation is only possible for $z=1$ and $x=2$. Finally: there were 2 packages with 16 juices, 4 packages with 17 juices, and 1 package with 40 juices.