- محدودیت زمان: ۱ ثانیه
- محدودیت حافظه: ۲۵۶ مگابایت
One day Amin and Ali and Farzad - Triangulum Team members - were sitting in ACM room. Amin likes numbers a lot so he wanted to make a sequence. In order to do it, he asked his teammates for cooperation. Amin came up with number 1 as first number of the sequence and wrote it down on the Whiteboard. Then, Ali declared 4 as second number of the sequence and wrote it down too. Ali was going for an Arithmetic-Sequence where every number is calculated using it’s $previousNumber + ConstantValue$ (here $ConstantValue$ is 3). Farzad doesn’t like Arithmetic-Sequences so he came up with a plan to ruin Ali’s idea. After a while, Farzad declared 9 as third number of the sequence and wrote it too. All of a sudden Shamir just walked into the ACM room and said: $Waazzzzaaaaauuuup?😝️$!!! and saw the numbers written on the Whiteboard. Shamir’s eyes do not see numbers very clearly because he just got back from SoGood restaurant (KFC or KF…) and he ate too much chickens there so he’s not feeling ok. He sees & writes numbers in reverse. He guesses that each element of sequence is square of a number n. Shamir likes coding a lot and that’s why when he finds an interesting sequence of numbers, he just have to code it immediately. But he’s not feeling ok due to the damage he received in restaurant and that’s why he asked you for help. He needs you to write a program that calculates square of number n and then prints it in reverse(For example reverse of the number $1243$ is $3421$)!
ورودی
The input file contains several test cases. each test case contains an Integer $N(0 < N ≤ 10^9 )$ in a line!(count of lines is less than 2000).
خروجی
For each test case print a number in a line as requested. (if there are any trailing zeros, print them)!
مثالها
ورودی نمونه ۱
1
2
3
11
خروجی نمونه ۱
1
4
9
121
ارسال پاسخ برای این سؤال