João has 30 chocolate bars with weights of 2, 3, or 4 kilograms. The total weight of the bars is 100 kilograms. Does João have more bars of $2 \mathrm{~kg}$ or of $4 \mathrm{~kg}$?
Solution

Let $x, y$ and $z$ be the quantities of bars of $2 \mathrm{~kg}, 3 \mathrm{~kg}$ and $4 \mathrm{~kg}$, respectively. We know that:

$$
\begin{aligned}
x+y+z & =30 \\
2 x+3 y+4 z & =100
\end{aligned}
$$

If we multiply the first equation by 3 and subtract it from the second, we get

$$
z-x=10
$$

Since $z-x>0$, it follows that we have more bars of $4 \mathrm{~kg}$ than bars of $2 \mathrm{~kg}$.