Problem 4. Lucia has a total of 2018 yellow, blue, and green balls. The number of green balls is 4 times greater than the number of blue balls. In an exchange, Lucia gives her friend Cristina 13 yellow balls and receives 5 blue balls and 7 green balls. After several such exchanges, Lucia is left with no yellow balls, but with 1271 green balls. Determine the initial number of yellow balls Lucia had?
Solution and grading: Let $k$ be the number of exchanges made between the two friends. Then the number of yellow balls is $13 k$. .................................................. The initial number of blue balls is $\frac{2018-13 k}{5}$, and the initial number of green balls is $\frac{4(2018-13 k)}{5}$

$2 p$

The final number of green balls is $\frac{4(2018-13 k)}{5}+7 k=1271$,

![](https://cdn.mathpix.com/cropped/2024_06_07_49d924dbd1e7b69c1726g-2.jpg?height=46&width=1585&top_left_y=909&top_left_x=232)
We obtain that Lucia initially had 1313 yellow balls. ......................................1p