# | Problem | Pass Rate (passed user / total user) |
---|---|---|
12871 | Baby Password 2 |
|
13253 | Frieza!! |
|
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) and then changed the case before being stored.
For example, if the original password is the character 'A', then after shifting by '+2' and changing the case, the actual password recorded on the database will be the second character after 'A', which is 'c'.
Original + Shift = Actual
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.
Note: Be aware of char overflow.
Input
The input will consist of the actual password and the shift
C D
(Note that C may be uppercase or lowercase character, 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
Description
During his fight, Trunks finally found an opening to strike Frieza with his sword. He plans to cut him into many pieces quickly. But his mother is a scientist and wants him to cut Frieza into equal sizes or else she will be disappointed in him. Luckily for Trunks, he has a program in his watch that can help him calculate it.
The program in his watch requires 2 variables:
1) F: The volume of Frieze and
2) S: The amount of slices Trunks plans to do
so F/S is the volume of each chunk of Frieza.
You need to write the program that helps Trunks with his calculations. The result of each calculation must also be rounded off to 2 decimal places.
Input
The input will contain 2 integers F and S.
Output
Print the results of the calculation rounded off to 2 decimal places, otherwise print "Error".
No newline is needed.