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
Inicia sesión para ver tu historial de envíos
Iniciar sesiónInicia sesión para usar el AI Mentor
Iniciar sesiónVisible tests
1
Input
-1Expected
False2
Input
0Expected
True3
Input
5Expected
True4
Input
6Expected
True5
Input
7Expected
False6
Input
25Expected
TrueFocus radio
Paused · SomaFM · Fluid