Task 1. The figure shows two code locks. The lock will open if different digits are entered in the circles so that the number inside each of the triangles matches either the sum or the product of the digits at its vertices. What combination of a) four b) five different digits will open the lock?
a)

![](https://cdn.mathpix.com/cropped/2024_05_06_966677e2574743a5a289g-1.jpg?height=195&width=300&top_left_y=471&top_left_x=400)
[1 point]
b)

![](https://cdn.mathpix.com/cropped/2024_05_06_966677e2574743a5a289g-1.jpg?height=186&width=329&top_left_y=474&top_left_x=757)
[3 points]

(V. A. Klepinin)
Answer. a) The figure shows two possible sets of digits that can unlock the lock. In each example, the top number can be swapped with the bottom number, and the right number with the left number.
![](https://cdn.mathpix.com/cropped/2024_05_06_966677e2574743a5a289g-1.jpg?height=192&width=644&top_left_y=933&top_left_x=400)

Comment. In both triangles, the number 14 is present. The digits in the circles should not repeat, and two out of the three digits in these triangles are common. Therefore, in one of the triangles, 14 must represent the sum, and in the other, the product. 14 as a product can only be represented as $1 \cdot 2 \cdot 7$. Let's see which of these digits can be common with the second triangle. It cannot be 1 and 2, as no third digit can bring their sum up to 14. Therefore, it must be either 2 and 7, or 1 and 7. In the first case, the remaining number is $14-(1+7)=6$, and in the second case, $14-(2+7)=5$.

b) See problem 1 for 7th grade (4.7).