Problem 5.3. In five of the nine circles in the picture, the numbers 1, 2, 3, 4, 5 are written. Replace the digits $6, 7, 8, 9$ in the remaining circles $A, B, C, D$ so that the sums of the four numbers along each of the three sides of the triangle are the same.

![](https://cdn.mathpix.com/cropped/2024_05_06_d55ea3e8288d58a3f771g-07.jpg?height=420&width=485&top_left_y=1241&top_left_x=484)

Construct the correspondence

- In circle $A$
- In circle $B$
- In circle $C$
- In circle $D$
- the number 6 is placed.
- the number 7 is placed.
- the number 8 is placed.
- the number 9 is placed.
Answer: $A=6, B=8, C=7, D=9$.

Solution. From the condition, it follows that $A+C+3+4=5+D+2+4$, from which $D+4=A+C$. Note that $13 \geqslant D+4=A+C \geqslant 6+7$. Therefore, this is only possible when $D=9$, and $A$ and $C$ are 6 and 7 in some order. Hence, $B=8$.

The sum of the numbers along each side is $5+9+3+4=20$. Since $5+1+8+A=20$, then $A=6$. Since $6+C+3+4=20$, then $C=7$.

![](https://cdn.mathpix.com/cropped/2024_05_06_d55ea3e8288d58a3f771g-08.jpg?height=418&width=474&top_left_y=433&top_left_x=494)