Automorphic Number
Submissions: 2317   Accuracy:

44.77%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Write a program to check whether a given number is Automorphic number or not.
A number is called Automorphic number if and only if its square ends in the same digits as the number itself.

For example, 762 = 5776 which ends with 76 therefore it is a automorphic number.

Input:

The first line of the input contains T denoting the total number of testcases. Each of the next T lines contains a positive integer N denoting the value of a number.


Output:

Output "Automorphic" if given number is Automorphic else "Not Automorphic" .


Constraints:

1<=T<=100
1<=N<=1000


Example:

Input:
2
1
16

Output:
Automorphic
Not Automorphic

** For More Input/Output Examples Use 'Expected Output' option **

Author: dipjal1996


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.