Neighbor Product
A pronic number can be written as the product of two consecutive non-negative integers. For example, 12 works because it is 3 * 4. Given a number number, return True if it can be formed this way. Otherwise, return False.
Примеры
Ввод
-1Вывод
FalseВвод
0Вывод
TrueВвод
2Вывод
TrueНужно реализовать
def is_pronic(number: int) -> bool:
Теги
math
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inVisible tests
1
Input
-1Expected
False2
Input
0Expected
True3
Input
2Expected
True4
Input
5Expected
False5
Input
6Expected
True6
Input
8Expected
FalseFocus radio
Paused · SomaFM · Fluid