Task 2. Write all five-digit numbers of the form $\overline{a b c d a}$ divisible by 45, where the digit in the hundreds place is the largest one-digit prime number.
Solution. A number is divisible by 45 if it is divisible by 9 and 5. A number is divisible by 5 if it ends in 0 or 5. Since the number starts with $a$, the digit $a$ must be 5.

From the condition of the problem, the digit $s$ is equal to 7.

A number is divisible by 9 if the sum of its digits is divisible by 9. Therefore, the sum $5+b+7+d+5=17+b+d$ must be divisible by 9, so the sum $b+d$ must be equal to 1 or 10.

If $b+d=1$, then the numbers are 50715 and 51705.

If $b+d=10$, then the numbers are

51795, 52785, 54765, 56745, 58725, 59715.