8. There is an unlimited number of test tubes of three types - A, B, and C. Each test tube contains one gram of a solution of the same substance. Test tubes of type A contain a $10\%$ solution of this substance, type B $-20\%$ solution, and type C $-90\%$ solution. Sequentially, one after another, the contents of the test tubes are poured into a certain container. In this process, two consecutive pourings cannot use test tubes of the same type. It is known that a $20.17\%$ solution was obtained in the container, performing the minimum number of pourings. What is the maximum number of test tubes of type C that can be used in this process?
Solution: Let the number of test tubes of types A, B, and C be $a$, $b$, and $c$ respectively. According to the problem, $0.1a + 0.2b + 0.9c = 0.2017 \cdot (a + b + c) \Leftrightarrow 1000 \cdot (a + 2b + 9c) = 2017 \cdot (a + b + c)$. The left side of the last equation is divisible by 1000, so the right side must also be divisible by 1000. Therefore, the smallest possible value of the sum $a + b + c$ is 1000. We will show that this estimate is achievable. That is, we will prove that there exist non-negative integers $a$, $b$, and $c$ such that

$$
\left\{\begin{array}{c}
a + b + c = 1000 \\
a + 2b + 9c = 2017 \\
a \leq 500, b \leq 500, c \leq 500
\end{array}\right.
$$

The last three inequalities are necessary and sufficient conditions to ensure that test tubes of the same type are not used in two consecutive transfers. From the first two equations of the system (1), we find

$$
a = 7c - 17, \quad b = 1017 - 8c
$$

Substituting these expressions into the last three inequalities of the system (1), we get

$$
7c \leq 517, \quad 8c \geq 518, \quad c \leq 500
$$

From these, the largest value of $c$ is 73. The corresponding values of $a$ and $b$ can be found from (2). They obviously satisfy the inequalities of the system (1). Thus, the solvability of the system (1) in non-negative integers is proven.

## Answer: 73