2109 - I2P(I)2020_Hu_lab1 Scoreboard

Time

2020/10/05 18:30:00 2020/10/05 20:20:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12376 Baby Password
12870 Simple calculator

12376 - Baby Password   

Description

You are a hacker in babyland.

In babyland, people set their passwords as their favorite uppercase character.

In order to prevent a "hacker" like you from stealing passwords by peeking at the database, the passwords are shifted by some integer (possibly zero or negative) before being stored.

For example, if the original password is the character 'A', then after shifting by '+2', the actual password recorded on the database will be the second character after 'A', which is 'C'.

Note that we will be dealing the alphabetic sequence as if it is a cycle, i.e., the letter before 'A' is 'Z', and the letter after 'Z' is 'A'.

Hence, if the original password is the character 'A', and the shift is '-1', the new password will be 'Z'.

You have stolen the shifted password stored on the database, denoted as C.

You also know the shift that had been applied to the original password, denoted as D.

Show the original password, followed by a newline character.

 

 

Input

C D

 

(Note that D may be in form "-X" or "+X", where X is an integer between 0 and 25)

Output

The original password, with a trailing newline character.

Sample Input  Download

Sample Output  Download

Tags




Discuss




12870 - Simple calculator   

Description

Howard, a freshman major in computer science, has an idea after learning arithmetic operator in the programming course. He wants to write a C program to make a simple calculator. He had tried around the clock but ended up realizing that it is not as easy as he have expected. So he asks you for help to write a program that can do simple calculation.

Input

Input contains two real numbers a, b (0 <= a, b < 1000, up to three decimal places) and one arithmetic operator(+, -, *, /) in the middle.

Output

Print the answer of the calculation. That is, 

  • If the operation is "+", print a plus b.
  • If the operation is "-", print a minus b.
  • If the operation is "*", print a times b.
  • If the operation is "/", print a divided by b.

Print the number with exactly three digits after the decimal points that rounds to the third decimal place.
If the answer is illegal, that is divided by zero, print "Error". (Without quotation marks)

Remember to print a newline character '\n' at the end.

Use double instead of float to prevent from floating point precision error.

Sample Input  Download

Sample Output  Download

Tags




Discuss