9.4. Let's call a natural number suitable if it is the smallest among all natural numbers with the same digit sum as it has. Find all suitable numbers that are perfect squares of natural numbers.
Answer: $1,4,9,49$.

Solution. In any suitable number, all digits except the first one are 9. Otherwise, by carrying the one from the highest place to the place where it is not 9, we get a smaller number with the same sum of digits (possibly with fewer digits). All single-digit numbers are suitable, so $1,4,9$ satisfy the condition. Further, if the square of a number ends in 9, then the number itself ends in 3 or 7. If the second-to-last digit of the number is $a$, then the second-to-last digit of the square will be $6a$ or $4a+4$ - even. Therefore, the number itself will be two-digit. Among them, only 49 fits.