

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
英大文字のみからなる文字列 があります。また、整数 が与えられます。
の各文字を、アルファベット順で 個後の文字に置き換えた文字列を出力してください。
ただしアルファベット順で Z
の 個後の文字は A
とみなします。
制約
- は英大文字のみからなる
入力
入力は以下の形式で標準入力から与えられる。
出力
の各文字を、アルファベット順で 個後の文字に置き換えた文字列を出力せよ。
入力例 1Copy
2 ABCXYZ
出力例 1Copy
CDEZAB
アルファベット順で Z
の 個後の文字は A
であることに注意してください。
入力例 2Copy
0 ABCXYZ
出力例 2Copy
ABCXYZ
入力例 3Copy
13 ABCDEFGHIJKLMNOPQRSTUVWXYZ
出力例 3Copy
NOPQRSTUVWXYZABCDEFGHIJKLM
Score : points
Problem Statement
We have a string consisting of uppercase English letters. Additionally, an integer will be given.
Shift each character of by in alphabetical order (see below), and print the resulting string.
We assume that A
follows Z
. For example, shifting A
by results in C
(A
B
C
), and shifting Y
by results in B
(Y
Z
A
B
).
Constraints
- consists of uppercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print the string resulting from shifting each character of by in alphabetical order.
Sample Input 1Copy
2 ABCXYZ
Sample Output 1Copy
CDEZAB
Note that A
follows Z
.
Sample Input 2Copy
0 ABCXYZ
Sample Output 2Copy
ABCXYZ
Sample Input 3Copy
13 ABCDEFGHIJKLMNOPQRSTUVWXYZ
Sample Output 3Copy
NOPQRSTUVWXYZABCDEFGHIJKLM