Problem:
 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

Solution (Python):
N = int(input())
S = list(input())

D = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

D = D + D

T = ""

for i in S:
  for j in range(26):
    if D[j] == i:
      T += D[j + N]
      break
print(T)

Solution (Python):
def f(c): return ord(c) - ord('A')


def g(x): return chr((x % 26) + ord('A'))


n = int(input())
print(''.join(g(x + n) for x in map(f, input())))

Solution (Python):
import string
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n = ri()
s = rs()
res = ''
for c in s:
    res += string.ascii_uppercase[(ord(c) - ord('A') + n) % 26]
print(res)

Solution (Python):

N = int(input())

S = input()

alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = ""

for i in S:

    for j in range(26):

        if alp[j] == i:
            ans += alp[j + N]

print (ans)

Solution (Python):


N = int(input())
S = input()

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for c in S:
    idx = alphabet.index(c) + N
    print(alphabet[idx], end='')

Solution (Python):

import sys
input = sys.stdin.readline
INF = 10**9

n = int(input())
s = input().rstrip()
ans = ""
ordA = ord("A")
for ch in s:
    val = ord(ch) - ordA
    val = (val + n) % 26
    ans += chr(val + ordA)
print(ans)

Solution (Python):
n = int(input())
s = input()

t = [chr(ord('A') + (ord(s[i]) - ord('A') + n) % 26) for i in range(len(s))]
ans = ''.join(t)
print(ans)

Solution (Python):
n=int(input())
s=list(input())
c=[chr(i) for i in range(65, 65+26)]
for i in range(len(s)):
  s[i]=c[(c.index(s[i])+n)%26]
print(''.join(s))

Solution (Python):
n = int(input())
s = input()
t = ""
for i in s:
    t += chr((ord(i)-ord('A')+n)%26 + ord('A'))
print(t)

Solution (Python):
def main():
    N = int(input())
    S = input()
    print(''.join(chr(ord('A') + (ord(i) - ord('A') + N) % 26) for i in S))

main()

Solution (Python):
N = int(input())
S = input()

print(''.join(map(lambda c: chr(ord(c)+N) if ord(c) + N <= ord('Z') else chr(ord(c)+N-26), S)))

Solution (Python):

N = int(input())
S = input()

ALP = [chr(i) for i in range(65, 65+26)]
A = ALP + ALP
ans = ""
for s in S:
    ind = A.index(s)
    ans += A[ind+N]
print(ans)

Solution (Python):
n = int(input())
s = list(input())
s = [chr((ord(i)-ord("A")+n)%26+ord("A")) for i in s]
ans = "".join(s)
print(ans)

Solution (Python):
N = int(input())
S = input()

ret = ''
for s in S :
    c = ord(s)
    c += N
    if c >= 91 :
        c = 64 + c - 90
    ret += chr(c)
print(ret)

Solution (Python):
N = input()
S = raw_input()

print "".join(chr((ord(s)-ord("A")+N)%26+ord("A")) for s in S)

Solution (Python):
N = int(input())
S = input()

ans = ""
for s in S:
    c = chr((ord(s)-65+N)%26+65)
    ans += c
print(ans)

Solution (Python):
from string import ascii_uppercase

n = int(input())
s = input()

base = ord('A')

ret = ''
for c in s:
    idx = (ord(c) - base + n) % 26 + base
    ret += chr(idx)
print(ret)

Solution (Python):
N = int(input())
S = input()
al1 = [chr(ord('A') + i) for i in range(26)]
al2 = [chr(ord('A') + i) for i in range(26)]
al = al1 + al2
ans = ""
for i in range(len(S)):
    ans += al[al.index(S[i]) + N]
print(ans)

Solution (Python):
def main():

    N = int(input())
    S = input()
    T = ""
    for c in S:
        T += chr((ord(c)-65 + N) % 26 + 65 )
    return T

if __name__ == '__main__':
    print(main())

Solution (Python):
n=int(input())
s=input()

print("".join(chr((ord(i)-ord('A')+n)%26+ord('A')) for i in s))

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    n = I()
    s = input()
    alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2
    ans = [alp[alp.find(i)+n] for i in s]
    print(*ans,sep = "")
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

n = ni()
s = ns().strip()
for c in s:
    x = ord(c)-ord('A')
    x = (x + n) % 26
    sys.stdout.write(chr(x+ord('A')))

Solution (Python):
n = int(input())
s = input()

ai = ord("A")

ans = ""
for e in s:
    ei = ord(e) - ai
    ei = (ei + n) % 26
    let = chr(ei + ai)
    ans += let

print(ans)

Solution (Python):
n = int(input())
s = list(input())

alph = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
memo = {}
for i in range(26):
    memo[alph[i]] = i
  
for i in range(len(s)):
    tmp = (memo[s[i]] + n) % 26
    s[i] = alph[tmp]
print("".join(s))

Solution (Python):
N = int(input())
S = input()

ans = ''
for c in S:
    i = ord(c) - ord('A')
    i = (i+N)%26
    ans += chr(i + ord('A'))
print(ans)

Solution (Python):
n=int(input())
s=input()
t=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ"*2)
a=""
for i in s:a+=t[t.index(i)+n]
print(a)

Solution (Python):
def rotN(c, N):
  if 'A' <= c and c <= 'Z':
    return chr((ord(c) - ord('A') + N) % 26 + ord('A'))

N=int(input())
S=input()
ans=""
for c in S:
  ans+=rotN(c, N)
print(ans)

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7




N = int(sys.stdin.buffer.readline())
S = sys.stdin.buffer.readline().decode().rstrip()

ans = ''
for c in S:
    ans +=chr(((ord(c) + N) - ord('A')) % 26 + ord("A"))
print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
import sys
import bisect
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7

ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"


def main():
    N = int(input())
    S = input()

    res = ""
    for i in range(len(S)):
        c = S[i]
        ind = ALPHA.index(c)
        kk = (ind + N) % len(ALPHA)
        res += ALPHA[kk]
    print(res)

    


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
r = ""
S = input()
for s in S :
    m = ord(s)+n
    if m > ord("Z") :
        m -= 26
    r+=chr(m)
print(r)