Problem 6.2. A jeweler has six boxes: two contain diamonds, two contain emeralds, and two contain rubies. On each box, it is written how many precious stones are inside.

It is known that the total number of rubies is 15 more than the total number of diamonds. What is the total number of emeralds in the boxes?

![](https://cdn.mathpix.com/cropped/2024_05_06_ddcc40423d5e6a42b0ccg-13.jpg?height=126&width=751&top_left_y=264&top_left_x=353)

#
# Answer: 12.

Solution. The total number of rubies is no more than $13+8=21$, and the number of diamonds is no less than $2+4=6$. According to the condition, their quantities differ by 15. This is only possible if the rubies are in the boxes with 13 and 8 stones, and the diamonds are in the boxes with 2 and 4 stones. Then the emeralds are in the two remaining boxes, and there are a total of $5+7=12$.