101461: [AtCoder]ABC146 B - ROT N

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $200$ points

Problem Statement

We have a string $S$ consisting of uppercase English letters. Additionally, an integer $N$ will be given.

Shift each character of $S$ by $N$ in alphabetical order (see below), and print the resulting string.

We assume that A follows Z. For example, shifting A by $2$ results in C (A $\to$ B $\to$ C), and shifting Y by $3$ results in B (Y $\to$ Z $\to$ A $\to$ B).

Constraints

  • $0 \leq N \leq 26$
  • $1 \leq |S| \leq 10^4$
  • $S$ consists of uppercase English letters.

Input

Input is given from Standard Input in the following format:

$N$
$S$

Output

Print the string resulting from shifting each character of $S$ by $N$ in alphabetical order.


Sample Input 1

2
ABCXYZ

Sample Output 1

CDEZAB

Note that A follows Z.


Sample Input 2

0
ABCXYZ

Sample Output 2

ABCXYZ

Sample Input 3

13
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Sample Output 3

NOPQRSTUVWXYZABCDEFGHIJKLM

Input

题意翻译

输入一个整数 $N$ ,和一个仅包含大写字母的字符串 $S$ 。 将字符串 $S$ 中的每个字母替换为字母顺序中的向后第 $N$ 个字母。 注意:Z后第一个字母记作A。 输出该字符串。

加入题单

算法标签: