Functions
Function-40
Function-41
Function-42
~/algor $ cat problems/funksiya-avtomorf-sonlar
Is it automorphic
Easy
1000 ms
128 MB
31%
Write a function IsAutomorphic(x) that returns true if the positive integer $x$ is automorphic and false otherwise. A number is automorphic if its square ends with the number itself.
Example 1: IsAutomorphic(76) → true — $76^{2} = 5776$.
Example 2: IsAutomorphic(7) → false — $7^{2} = 49$.
Write only the function body.
Input
One line with a positive integer $x$ — the argument of the function.
Output
The value returned by the function: true or false.
Note
$1 \le x \le 10^{6}$
Examples
Input #1
76
Output #1
true
Input #2
7
Output #2
false