Functions
Function-23
Function-24
Function-25
~/algor $ cat problems/funksiya-kvadrat-sonmi
Is it a perfect square
Easy
1000 ms
128 MB
27%
Write a function IsPerfectSquare(x) that returns true if the non-negative integer $x$ is the square of some integer and false otherwise.
Example 1: IsPerfectSquare(49) → true — $49 = 7^{2}$.
Example 2: IsPerfectSquare(50) → false
Write only the function body.
Input
One line with a non-negative integer $x$ — the argument of the function.
Output
The value returned by the function: true or false.
Note
$0 \le x \le 10^{15}$
Examples
Input #1
49
Output #1
true
Input #2
50
Output #2
false