3. How many three-digit numbers have the property that by erasing some digit we get a two-digit number which is a square of some integer? (We do not consider representations like 07 as two-digit numbers.)

(Tomáš Bárta, Tomáš Jurík)
Solution. Let's denote the digit we strike out from the sought three-digit number as $x$ and the resulting two-digit number as $\overline{a b}(a \neq 0)$. Two-digit numbers that are squares of integers are only the numbers in the set

$$
\mathrm{M}=\{16,25,36,49,64,81\}
$$

If we strike out the first digit, i.e., from the number $\overline{x a b}$ we get the number $\overline{a b}$, the value of the digit $x$ can be from 1 to 9 (the original number is three-digit, so $x \neq 0$). There are $9 \cdot 6$ such numbers, because we have 9 options for the digit $x$ and 6 options for the number $\overline{a b}$ from the set M. If we strike out the middle or the last digit, in both cases we have $10 \cdot 6$ options, because the digit $x$ can be any from 0 to 9. In total, this is $(9+10+10) \cdot 6=$ $=174$ options by which we can get a two-digit number from some three-digit number that is in the set M.

However, the problem asks for the number of three-digit numbers, and we might have counted some numbers multiple times. One number can be counted at most three times, because we have only three options for which digit to strike out. Let's first examine how many numbers we counted twice, such as the number 116, in which we can strike out digits in two ways (first and middle).

We could count a number twice only if it is of the form $\overline{a a b}, \overline{a b b}$, or a number $\overline{a b c}$ with different digits, such that two of the resulting numbers $\overline{a b}, \overline{a c}, \overline{b c}$ are in the set $\mathrm{M}$. Since each number $\overline{a b}$ from the set $\mathrm{M}$ has different digits, it is possible to create two such numbers from it: $\overline{a a b}$ and $\overline{a b b}$. There are $6 \cdot 2$ such numbers. Numbers of the type $\overline{a b c}$ are 6, because these are the numbers that contain two different numbers from the set $\mathrm{M}$ with a common digit, and by examining such pairs from M, we find that they are the numbers 816, 649, 136, 316, 164, and 364.

Now we will show that we did not count any number three times, i.e., that by striking out any of its digits, we would not get a number from the set $\mathrm{M}$. It is enough to realize that the only candidates for triple counting are the 18 numbers found in the previous paragraph, and by striking out digits, we will find that none of them meet the condition. Or we can prove the non-existence of such a triple-counted number by contradiction:

Assume the existence of a number $\overline{d e f}$ (some of its digits may be the same) with the property that the numbers $\overline{d e}, \overline{e f}$, and $\overline{d f}$ are in the set $\mathrm{M}$. The digits $d$ and $e$ cannot be the same, because a two-digit number with the same digits is not in the set M. Thus, the two different numbers $\overline{e f}$ and $\overline{d f}$ from the set M have the same last digit, which, as we can see, can only be the digit 6. The only possibility in that case is that the numbers $\overline{e f}$ and $\overline{d f}$ are 16 and 36 in some order. Finally, the number $\overline{d e}$ would have to be 13 or 31, neither of which is in the set M. Therefore, we did not count any number three times.

The sought number of numbers is $174-12-6=156$.