Square Ending

An automorphic number is recognized by its square: the square must end with the original number. For example, 25 ** 2 is 625, and the last digits are 25 again. Given a number number, return True if it is automorphic. Otherwise, return False.

Примеры

Ввод
-1
Вывод
False
Ввод
0
Вывод
True
Ввод
5
Вывод
True

Нужно реализовать

def is_automorphic_number(number: int) -> bool:

Теги

math
PostgreSQLv16

Ovdje će se prikazati rezultat izvršavanja koda

Visible tests
1
Input
-1
ExpectedFalse
2
Input
0
ExpectedTrue
3
Input
5
ExpectedTrue
4
Input
6
ExpectedTrue
5
Input
7
ExpectedFalse
6
Input
25
ExpectedTrue
Focus radio
Paused · SomaFM · Fluid