#C9974. Automorphic Number Check
Automorphic Number Check
Automorphic Number Check
An automorphic number is a number whose square ends with the number itself. In other words, if you square the number, the last digits of the square will be the same as the original number. For example, 76
is automorphic because \(76^2 = 5776\) and the number 5776 ends with 76.
Your task is to write a program that reads a single positive integer n from standard input and prints True
if n is automorphic, and False
otherwise.
inputFormat
The input consists of a single line containing a positive integer n.
outputFormat
Output a single line: True
if the number is automorphic, otherwise False
.
76
True