2409 - I2P(I)2021_Hu_lab3-B Scoreboard

Time

2021/10/25 18:30:00 2021/10/25 20:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12871 Baby Password 2
13292 Nappa's Alphabet 2

12871 - Baby Password 2   

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




13292 - Nappa's Alphabet 2   

Description

Despite being able to destroy a city and an entire army, Nappa is really bad at spelling. Luckily, his good friend Vegeta is going to help him so that Nappa does not have to ask him too many questions.

In order to do this, Vegeta needs to develop a program that creates alphabets in a pattern Nappa is familiar with, pyramids, then he will test Nappa with the program. If Napppa fails the test, he will be destroyed.

The program Vegeta needs to create will require a single integer as an input which will determine the layers a pyramid has. At the center of the pyramid, there will be firsst letter of the alphabet and it will be surrounded by layers of following alphabets.

Vegeta needs to make this program quick before he gets an aneurism from Nappa's stupidity.

Input

N

N will only be in range of the total number of alphabets.

Output

Lowercase alphabet pyramid

Detail will show in sample output

Remember to put "\n" in every line

Sample Input  Download

Sample Output  Download

Tags




Discuss