1. Stefan, Filip, and Nikola brought a total of 222 denars on a trip. Stefan spent $\frac{1}{3}$ of his amount, Filip $\frac{1}{5}$ of his amount, and Nikola $\frac{7}{15}$ of his amount. After that, they had equal amounts of money left. How much money did each of them bring on the trip?
Solution. Let Stefan put in $x$ denars, Philip put in $y$ denars, and Nikola put in $z$ denars. From the condition of the problem, we have

$$
x+y+z=222
$$

After spending their money, Stefan was left with $\frac{2}{3} x$ denars, Philip was left with $\frac{4}{5} y$ denars, and Nikola was left with $\frac{8}{15} z$ denars. From the condition of the problem, we have $\frac{2}{3} x=\frac{4}{5} y=\frac{8}{15} z$, from which $5 x=6 y=4 z$. Therefore, $y=\frac{5}{6} x$ and $z=\frac{5}{4} x$, and by substitution in (1) we get $x+\frac{5}{6} x+\frac{5}{4} x=222$. Solving the last equation, we get $x=72$, from which $y=\frac{5}{6} \cdot 72=60$ and $z=\frac{5}{4} \cdot 72=90$. Therefore, Stefan put in 72 denars, Philip put in 60 denars, and Nikola put in 90 denars.