613 - I2P2014_Yang_Lab_2 Scoreboard

Time

2014/10/02 13:40:00 2014/10/02 14:40:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10077 Lab_2

10077 - Lab_2   

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 not need to print ‘ ’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss