Exact Square
A perfect square is a number you can get by multiplying an integer by itself. For example, 16 works because it is 4 * 4. Given a non-negative integer num, return True if it is a perfect square. Otherwise, return False.
Примеры
Ввод
9Вывод
TrueВвод
16Вывод
TrueВвод
1Вывод
TrueНужно реализовать
def perfect_square(num: int) -> bool:
Теги
mathbinary-search
Connectez-vous pour voir l'historique des soumissions
Se connecterConnectez-vous pour utiliser le Mentor IA
Se connecterVisible tests
1
Input
9Expected
True2
Input
16Expected
True3
Input
1Expected
True4
Input
0Expected
True5
Input
10Expected
False6
Input
17Expected
TrueFocus radio
Paused · SomaFM · Fluid