Next Square Up
A perfect square is a number that can be written as x * x for some integer x. Given a non-negative integer num, check whether it is a perfect square. If it is, return the next perfect square after it; otherwise, return -1.
Примеры
Ввод
25Вывод
36Ввод
0Вывод
1Ввод
121Вывод
144Нужно реализовать
def find_next_square(num: int) -> int:
Теги
math
Prijavite se za ogled zgodovine oddaj
PrijavaPrijavite se za uporabo mentorja UI
PrijavaVisible tests
1
Input
25Expected
362
Input
0Expected
13
Input
121Expected
1444
Input
10Expected
-15
Input
1Expected
46
Input
7Expected
-1Focus radio
Paused · SomaFM · Fluid