AtCoder Beginner Contest 146
翻译中…
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.
翻译中…
样例
Input #1
2
ABCXYZ
Output #1
CDEZAB
Note that `A` follows `Z`.
Input #2
0
ABCXYZ
Output #2
ABCXYZ
Input #3
13
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Output #3
NOPQRSTUVWXYZABCDEFGHIJKLM
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。