2575 - I2P(I)2022_Yang_lab3 Scoreboard

Time

2022/10/04 18:30:00 2022/10/04 20:30:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
12893 Let's build a sequence
13601 Ultimate caesar salad

12893 - Let's build a sequence   

Description

There is a sequence a1, a2, a3, ..., aN.

Let's say that the difference between a1 and a2 is b1,
the difference between a2 and a3 is b2,
and so on.

That is, the difference between ai and ai+1 is bi.

We know that the sequence b1, b2, ... bN-1 is a arithmetic sequence.

An arithmetic sequence is a sequence of numbers such that the difference of any two successive members of the sequence is a constant.

Given you N, a1, a2, a3,
print the sequence a1, a2, a3, ... aN.

ouo.

Input

Input contains 2 lines.

The first line contains an integer N,
where N is the amount of number in the sequence.

The second line contains 3 integer a1, a2, a3,
where a1, a2, a3 are the first three number of the sequence.

It is a guarantee that:

3 <= N <= 200,
1 <= a1, a2, a3 <= 10^5

Output

Output contains only 1 line.

You should output a1, a2, ... aN and separate these numbers by spaces.

Remember to print a newline character at the end of the line.

It's a guarantee that the output will always be inside the range of -2147483648 ~ +2147483647.

Sample Input  Download

Sample Output  Download

Tags




Discuss




13601 - Ultimate caesar salad   

Description

Sometimes, the hackers would intercept the messages sent by Caesar. Since privacy is quite valued by Caesar, he discovers a new way of encryption.

The encryption process includes two steps:

  • First, we would apply a specific number of right shifts (within [0, 25]) for each letter in the string. For instance, if we have a message "AAAAA", and we want to apply {1, 2, 3, 4, 5} of right shifts for each letter, then the encrypted message would be "BCDEF". We can regard the letter following Z as A again. For example, if we apply 3 right shifts on Y, it would be B.
  • Second, we change every letter from uppercase to lowercase and lowercase to uppercase. For instance, if we have a shifted message "aBcDe", the final encrypted message would be "AbCdE". (It does not help for the encryption. Caesar does it for fun.)

Given a pair of plaintext and encrypted message, we can derive the encryption scheme, that is, how many right shifts are applied to each letter of the string. Caesar can't wait to have more salads! To order more salads, please help him to encrypt another given message by applying the encryption scheme. 

Sample I/O's number of shifts: {1, 24, 5, 3, 21}.

Input

The input has three lines: Plaintext A, encrypted message A' of A, and another plaintext B to be encrypted. These strings contain only uppercase and lowercase letters (A-Z, a-z), and their length is all exactly 5.

Output

Print one line, the encrypted message B' of B.

Please remember to print '\n' at the end.

Sample Input  Download

Sample Output  Download

Tags




Discuss