Problem 5. In a store, there were three types of chocolate boxes: 16 kg, 17 kg, and 40 kg. The seller is not allowed to open any box and take out chocolates. A customer wanted to buy 100 kg of chocolates. How did the seller measure out 100 kg of chocolates for the customer?
Solution. First method. Clearly, the seller cannot use three boxes of $40 \mathrm{~kg}$. The seller cannot use two boxes of $40 \mathrm{~kg}$ either, because they need to add another $20 \mathrm{~kg}$, which cannot be done with the $16 \mathrm{~kg}$ and $17 \mathrm{~kg}$ boxes.

If the seller uses one box of $40 \mathrm{~kg}$, then for the remaining 60 $\mathrm{kg}$, they need to use boxes of $16 \mathrm{~kg}$ and $17 \mathrm{~kg}$. This cannot be done with boxes of only one type, because 60 is not divisible by either 16 or 17. Therefore, there must be at least one box of $16 \mathrm{~kg}$ and one box of $17 \mathrm{~kg}$. Then, they are left with $60-(16+17)=27 \mathrm{~kg}$, which cannot be achieved with the $16 \mathrm{~kg}$ and $17 \mathrm{~kg}$ boxes.

Therefore, the seller must use only boxes of $16 \mathrm{~kg}$ and $17 \mathrm{~kg}$. If they take six boxes of $16 \mathrm{~kg}$, then they will be short of $100-6 \cdot 16=4 \mathrm{~kg}$. However, when one box of $16 \mathrm{~kg}$ is replaced with a box of $17 \mathrm{~kg}$, an additional $1 \mathrm{~kg}$ is obtained, so the seller needs to replace 4 boxes of $16 \mathrm{~kg}$ with boxes of $17 \mathrm{~kg}$. Finally, the seller needs to use 4 boxes of $17 \mathrm{~kg}$ and 2 boxes of $16 \mathrm{~kg}$.

Second method. Since $2 \cdot(2 \cdot 17+16)=100$, it follows that the seller gave the buyer 4 boxes of $17 \mathrm{~kg}$ and 2 boxes of $16 \mathrm{~kg}$.

## V section