4. On the board, the product of the numbers $\overline{\text{IKS}}$ and $\overline{\text{KSI}}$ is written, where the letters correspond to different non-zero decimal digits. This product is a six-digit number and does not end in zero. Petya erased all zeros and one digit $C$ from the board, after which $\text{IKS}$ remained. What was written on the board?
Answer: $206032=632 \cdot 326$

Solution. Let $p=\overline{\text { IKS }} \cdot \overline{\mathrm{KSI}}$. In the decimal representation of $p$, the digits I and K appear once, while the digits S and 0 appear twice. Then the numbers $(I+K+S)^{2}$ and ( $I+K+2S$ ) give the same remainders when divided by 9, from which $S \bmod 9=(I+K+S)(I+K+S-1) \bmod 9$. The relationship between numbers $n$ and $n(n-1) \bmod 9$ is given in the table:

| $n$ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $n(n-1) \bmod 9$ | 0 | 2 | 6 | 3 | 2 | 3 | 6 | 2 | 0 |

(thereafter the remainders will cyclically repeat). Thus, $S \in\{2,3,6,9\}$. The last digit of the number $p$ is $S$, since $p$ does not end in zero. On the other hand, the last digit of $p$ is the remainder of $S \cdot I$ divided by 10. Therefore, $S \cdot (I-1) \vdots 10$. Since the digit $S$ is not divisible by 5, there are two cases.

1) $I=1$. The second last digit of the number $p$ is the remainder of $S^{2}+K$ divided by 10. Since $S^{2}$ is not divisible by 10, this digit is different from K. Therefore, it is equal to S or 0. Let's first assume it is equal to S. Then $S^{2}-S+K \vdots 10$. The remainders of $S^{2}-S$ divided by 10 take only the values 0, 2, and 6, from which K is 4 or 8. For $K=4$

$$
(5+S)^{2}-5-2S \vdots 9 \Longleftrightarrow S^{2}+8S-7 \vdots 9 \Longleftrightarrow S(S-1) \bmod 9=7
$$

which is impossible (see the table). If $K=8$, then $I+K=9$ and $(S^{2}-2S) \vdots 9$, from which $S=2$ or $S=9$. These cases do not fit us, since $189 \cdot 891=168399$ and $182 \cdot 821=149422$.

Now let the second last digit of the number $p$ be zero. Then $S^{2}+K$ is divisible by 10. Since $S^{2} \bmod 10 \in\{1,4,6,9\}$ and the digits I, K, S are different, the pair $(K, S)$ can be $(6,2)$ or $(4,6)$. Since $162 \cdot 621=100602$ and $146 \cdot 461=67306$, these cases also do not fit.
2) $I=6$ and the digit $S$ is even. Then $S=2$, since $S \neq$ I. From the table we get

$$
I+K+S \in\{11,14,17\} \Longleftrightarrow 8+K \in\{11,14,17\} \Longleftrightarrow K \in\{3,9\}
$$

since $K \neq$ I. If $K=9$, then $692 \cdot 926=640792$, which does not fit us. In the case $K=3$ we get $632 \cdot 326=206032$, which gives the answer.