7.3 Petya wrote down all natural numbers from 1 to $n$ in a row and counted the total number of digits written. Then he called Kolya and asked: "What is $n$ if a total of 2018 digits are written?" Kolya said: "Count again, you made a mistake." Who is right?
Answer. Kolya is right. Note. If 2018 digits are written, then the number $n$ must be a three-digit number: indeed, in the case of a two-digit $n$, no more than $9+2 \cdot 90=189$ digits would be written, and in the case of a four-digit (or more) number, more than $9+2 \cdot 90+3 \cdot 900=2889$ digits would be written. Let $k-$ be the number of three-digit numbers written ( $k=n-99$ ). Then the total number of digits written is $9+2 \cdot 90+3 \cdot k$, so it cannot equal 2018 (since 2018 is not divisible by 3).