5. In the number $2 * 0 * 1 * 6 * 0 * 2 *$, each of the 6 asterisks needs to be replaced with any of the digits $0,2,4,5,7,9$ (digits can be repeated) so that the resulting 12-digit number is divisible by 75. In how many ways can this be done?
Answer: 2592.

Solution. For a number to be divisible by 75, it is necessary and sufficient that it is divisible by 25 and by 3. To ensure divisibility by 25, we can choose 5 as the last digit (1 way).

To ensure divisibility by three, we proceed as follows. Select four digits arbitrarily (this can be done in $6 \cdot 6 \cdot 6 \cdot 6$ ways), and choose the fifth digit so that the sum of all the digits of the number is divisible by 3. Since among the given digits, there are two digits divisible by 3 (0 and 9), two digits that give a remainder of 1 when divided by 3 (4 and 7), and two digits that give a remainder of 2 when divided by 3 (2 and 5), this selection can be made in two ways.

Applying the rule of product, we get a total of $1 \cdot 6 \cdot 6 \cdot 6 \cdot 6 \cdot 2 = 2592$ ways.

![](https://cdn.mathpix.com/cropped/2024_05_06_6b29ef4d534e57085f3bg-28.jpg?height=180&width=1099&top_left_y=1166&top_left_x=90)

a) Plot on the plane $(x ; y)$ the set of points satisfying the first equation of the system, and find the area of the resulting figure.

b) Find all values of the parameter $a$ for which the system has exactly three solutions.

Answer: a) 60, b) $a=-36, a=32$.

Solution. Note that the equality $|a|+|b|+|c|=a+b+c$ holds if and only if the numbers $a, b$, and $c$ are non-negative (since if at least one of them is negative, the left side is greater than the right side). Therefore, the first equation is equivalent to the system of inequalities

$$
\left\{\begin{array}{l}
85 x \geq 0, \\
8 y \geq 0, \\
120 - 15 x - 8 y \geq 0
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x \geq 0 \\
y \geq 0 \\
15 x + 8 y \leq 120
\end{array}\right.\right.
$$

This system defines a triangle on the plane with vertices $E(8 ; 0), G(0 ; 15), N(0 ; 0)$, the area of which is 60.

The second equation of the original system defines a circle (or a point when $a=-2$). The system can have exactly three solutions only in one case: when the circle defined by the second equation is circumscribed around the triangle $E G N$. The center of the circle circumscribed around a right triangle is the midpoint of the hypotenuse, and its radius is half the hypotenuse, from which we obtain the conditions

$$
4 \cos \frac{a \pi}{2}=4,\left(\frac{a+2}{4}\right)^{2}=\left(\frac{17}{2}\right)^{2}
$$

The second equation gives two values of the parameter: $a=-36$ and $a=32$. By substitution, we verify that both satisfy the first equation.