2. A nine-digit natural number $A$, written in the decimal system, is obtained from the number $B$ by moving the last digit to the first place. It is known that the number $B$ is coprime with the number 18 and $B>22222222$. Find the largest and smallest among the numbers $A$ that satisfy these conditions. (Two natural numbers are called coprime if they have no common divisors other than one). (8 points)
Solution. Obviously, the last digit of the number $B$ cannot be zero, since when rearranged, it becomes the first digit of the number $A$. $18=2 \cdot 3^{2}$, so the number $B$ will be coprime with 18 if and only if it is not divisible by 2 or 3.

If $b$ is the last digit of the number $B$, then the number $A$ is expressed through $B$ using the formula

$$
\left.\mathrm{A}=10^{8} \cdot b+1 / 10 \cdot(B-b) \text { (it is clear that } B-b \text { is divisible by } 10\right) \text {. }
$$

Obviously, the larger the last digit of the number $B$, the larger the number $A$ that corresponds to it. To make $A$ the largest, the last digit of the number $B$ must take the largest possible value, i.e., $b=9$.

If $B^{\prime}$ and $B$ end in 9 and $B^{\prime}>B$, then

$$
A^{\prime}=9 \cdot 10^{8}+1 / 10 \cdot\left(B^{\prime}-9\right)>9 \cdot 10^{8}+1 / 10 \cdot(B-9)=A \text {. }
$$

This means that the larger the number $B$, the larger the number $A$ that corresponds to it (for numbers $B$ ending in 9).

The largest possible nine-digit number is 999999999. This number is not divisible by 2, but it is divisible by 3. Decrease the second-to-last digit by 1 and we get $B=999999989$. This number satisfies all conditions: it ends in 9, is coprime with 18, and is the largest among all such numbers. Therefore, it corresponds to the largest possible number $A_{\max }=$ 99999998.

Similarly, the smallest number is determined: the first digit of $A$ (i.e., the last digit of $B$) must be the smallest possible, so $b=1$. Among the numbers $B$ ending in 1, the smallest $A$ corresponds to the smallest $B$. If the last digit is 1, the smallest number greater than 222222222 is 222222231. But the sum of the digits of this number is 18, and it is divisible by 3. Changing the second-to-last digit to 1, we get the number $B=$ 222222241, which satisfies all conditions: it ends in 1, is coprime with 18, and is the smallest among all such numbers. It corresponds to the smallest possible number $A_{\text {min }}=122222224$.

$$
\text { Answer. } A_{\min }=122222224, A_{\max }=999999998 .
$$

![](https://cdn.mathpix.com/cropped/2024_05_06_66ff5449eae3e24affe1g-40.jpg?height=66&width=1056&top_left_y=384&top_left_x=297)

Solution. $x \geq 0$. Transform the inequality to the form:

![](https://cdn.mathpix.com/cropped/2024_05_06_66ff5449eae3e24affe1g-40.jpg?height=106&width=486&top_left_y=575&top_left_x=425)

$$
\begin{aligned}
& x+x+\ldots+x+1
\end{aligned}
$$

![](https://cdn.mathpix.com/cropped/2024_05_06_66ff5449eae3e24affe1g-40.jpg?height=96&width=475&top_left_y=703&top_left_x=428)

But by the arithmetic mean-geometric mean inequality

![](https://cdn.mathpix.com/cropped/2024_05_06_66ff5449eae3e24affe1g-40.jpg?height=116&width=802&top_left_y=845&top_left_x=427)

therefore,

the only

solution to the inequality is $x=1$.

Answer. $x=1$.