2394 - I2P(I)2021_Yang_hw2 Scoreboard

Time

2021/10/05 21:00:00 2021/10/12 18:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
11111 Encode number
12009 Caesar salad
13254 Temperature Conversion

11111 - Encode number   

Description

Suppose that we have an encoding scheme defined by the following mapping:
1->'A', 2->'B', 3->'C', ..., 9->'I'
Given a three-digit number N as the input, use the above mapping to encode N.

Input

A three-digit integer N

Output

The encoding result

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

Sample Input  Download

Sample Output  Download

Tags

(*head)=buildTree() newNode->data == '&' newNode->data == '|' buildTree(); Node* buildTree()



Discuss




12009 - Caesar salad   

Description

Caesar wants to eat salad, but nobody sells salad within his country. Thus, he decides to write a letter to the businessmen outside his country. But to secure his message, he has to encrypt the content of his letter.

The encrypt rule is as follow: For each English character inside his letter, shift it with a fixed number n in positive/negative direction.

For example,

  • n = 2, then "IJK" will become "KLM"
  • n = 3, then "IJK" will become "LMN"
  • n = -2, then "AJK" will become "YHI"
    • We do the shifting in a cyclic manner, that is, perform left shift 1 on "A" will become "Z"; right shift 2 on "Y" will become "A"

Actually, this encryption is the well-known Caesar chiper.

Input

Input consists of three UPPERCASE English characters and an integer nseperated by a whitespace character.

The three uppercase English characters is the Caesar's message, n is the shift amount mentioned above (positive for right shift, negative for left shift).

It is guaranteed that -2147483648 <= n <= 2147483647.

Output

Print Caesar's message after encryption (three UPPERCASE English character).

Remember to print a '\n' at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss




13254 - Temperature Conversion   

Description

Converting temperature between Celsius and Fahrenheit is a basic skill. You are asked to write a program which can do such task automatically. The following is the conversion rule:

Input

Given a integer t and two chars x, y ( 'C' or 'F'). Please convert the temperature t from unit x to y.  

(0 <= t <= 1000)

Output

Output the answer, which is a floating point rounded to 2nd decimal places.

Please print '\n' in the last line.

Sample Input  Download

Sample Output  Download

Tags




Discuss