11.5. In a zoo, there live chameleons of three colors: $x$ chameleons of yellow color, 2022 chameleons of white color, and 100 chameleons of pink color. Chameleons can meet each other, but only two at a time. If two chameleons of the same color meet, they do not change their color. If two chameleons of different colors meet, then both simultaneously change their color to the third color. For what values of $x$ is it possible for all chameleons in the zoo to be of the same color at some point in time?
## Solution.

Assume that at a certain moment in the zoo, there are: $a$ brown chameleons, $b$ white chameleons, and $c$ pink chameleons, i.e., we have the triplet $(a, b, c)$. After the meeting of any two chameleons, this triplet changes to one of the following three:

a) $(a-1, b-1, c+2)$, or

b) $(a-1, b+2, c-1)$, or

c) $(a+2, b-1, c-1)$.

Consider three positive differences between the numbers of chameleons of different colors in the triplet. Before the meeting of any two chameleons, these are:

$$
(a-b), \quad(b-c), \quad(a-c)
$$

After the meeting, we have the following positive differences:

a) $(a-b),(b-c-3),(a-c-3)$, or

b) $(a-b-3),(b-c+3),(a-c)$, or

c) $\quad(a-b+3),(b-c),(a-c+3)$.

We observe that after the meeting, these differences either do not change or change by 3 or -3.

Therefore, the remainders $\left(r_{1}, r_{2}, r_{3}\right)$ of these differences when divided by 3 remain the same after any meeting of any two chameleons, and, consequently, remain the same after any number of meetings of pairs of chameleons.

According to the condition, initially, these differences are equal to: $(x-2022),(2022-100),(x-100)$ and

$$
\begin{aligned}
& x-2022=r_{1}+3 m \\
& 2022-100=1922=r_{2}+3 n, \quad m, n, k \in Z \\
& x-100=r_{3}+3 k
\end{aligned}
$$

From here, we get

$$
\begin{gathered}
x=r_{1}+3 t \\
r_{2}=2 \\
x=r_{3}+1+3 s .
\end{gathered}
$$

If all chameleons will become the same color, then for the final triplet $(a, b, c)$ we will have one of the variants: either $(0,0, p)$, or $(0, p, 0)$, or $(p, 0,0)$, where $p=2022+100+x=2122+$ $x$. Then either $r_{1}=0, r_{2}=r_{3}$, or $r_{3}=0, r_{1}=r_{2}$, or $r_{2}=0, r_{1}=r_{3}$. From the system (*) it follows that only the first case can occur, and

$$
x=3 t, \quad t \in Z
$$

i.e., $x$ is divisible by 3.

It remains to show that for any triplet of (3t, 2022, 100) chameleons, it is possible to reach a situation where all chameleons are of the same color (where the triplet $(a, b, c)$ has 2 zero positions).

If brown and white chameleons meet, and then pink and white chameleons meet, we will obtain the triplet $(x+1,2020,101)$. We repeat these meetings until the 1st and 2nd positions in the triplet are equal, or the 2nd and 3rd positions in the triplet are equal. Since the remainders modulo 3 of the positions are different, one of these two situations will occur. Once any two positions in the triplet are equal, we will arrange meetings of chameleons of the corresponding colors. At the end of these meetings, these positions will be equal to 0.