11583 - EECS_LAB_1   

Description

The input is a four-digit positive integer x that consists of digits 1-9 except 0. Let y be the number with the first two digits and the rest of x swapped. For example, if x is 9527, then y is 2795. Now, calculate z, which is the square of y, and encode z by the following mapping:

1->’A’, 2->’B’, 3->’C’, …, 9->’I’, 0->’J’

You should pad 0 on the left of z to make z an eight-digit number before encoding.

That is, since y is 2795 and its square z is 7812025, the padded version of z is 07812025, and so your answer should be JGHABJBE.

Input

 A four-digit positive integer consisting of 1-9 except 0.

 

Output

 The encoded z. Note that you do need to print ‘\n’ at the end of the output.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss