Task B-1.5. In a container, which is not full to the brim, there is a solution containing $85 \%$ alcohol. We fill the container to the brim with a solution containing $21 \%$ alcohol and mix it thoroughly. If we then pour out as much liquid as we added and repeat the process (again adding a $21 \%$ alcohol solution), we will obtain a solution containing $70 \%$ alcohol. How much alcohol does the solution contain after the first topping up? What fraction of the container was filled with the solution before the first topping up?
First solution. Let $x$ be the amount of solution in the container before pouring, and $y$ be the total amount of liquid that the container can hold. Let $p$ be the percentage of alcohol in the solution after the first topping up.

Then, for the amount of alcohol after the first topping up, we have

$$
p \% y=85 \% x+21 \%(y-x)
$$

which gives

$$
\frac{x}{y}=\frac{p-21}{64}
$$

For the amount of alcohol after the second topping up, we have

$$
70 \% y=p \% x+21 \%(y-x)
$$

or

$$
\frac{x}{y}=\frac{49}{p-21}
$$

Solving the system of equations (1) and (2), we get

$$
\begin{aligned}
(p-21)^{2} & =49 \cdot 64 \\
p-21 & =7 \cdot 8 \\
p & =77
\end{aligned}
$$

The percentage of alcohol after the first topping up is $77 \%$.

Then from (1) or (2) it follows that

$$
\frac{x}{y}=\frac{56}{64}=\frac{7}{8}
$$

so before the first topping up, $\frac{7}{8}$ of the container was filled with the solution.