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



Sample input:
2
ABCXYZ


Sample output:
CDEZAB

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 21 15:05:30 2019

@author: Shunya
"""
N=int(input())
input1 = input()
inputbox1 = list(input1)

li=[0] * 1000
li2=[0] * 1000
ans :str =""
for i in range (0,len(inputbox1)):
    if (inputbox1[i]=="A"):
        li[i]=1+N
    elif (inputbox1[i]=="B"):
        li[i]=2+N
    elif (inputbox1[i]=="C"):
        li[i]=3+N
    elif (inputbox1[i]=="D"):
        li[i]=4+N
    elif (inputbox1[i]=="E"):
        li[i]=5+N
    elif (inputbox1[i]=="F"):
        li[i]=6+N
    elif (inputbox1[i]=="G"):
        li[i]=7+N
    elif (inputbox1[i]=="H"):
        li[i]=8+N
    elif (inputbox1[i]=="I"):
        li[i]=9+N
    elif (inputbox1[i]=="J"):
        li[i]=10+N
    elif (inputbox1[i]=="K"):
        li[i]=11+N
    elif (inputbox1[i]=="L"):
        li[i]=12+N
    elif (inputbox1[i]=="M"):
        li[i]=13+N
    elif (inputbox1[i]=="N"):
        li[i]=14+N
    elif (inputbox1[i]=="O"):
        li[i]=15+N
    elif (inputbox1[i]=="P"):
        li[i]=16+N
    elif (inputbox1[i]=="Q"):
        li[i]=17+N
    elif (inputbox1[i]=="R"):
        li[i]=18+N
    elif (inputbox1[i]=="S"):
        li[i]=19+N
    elif (inputbox1[i]=="T"):
        li[i]=20+N
    elif (inputbox1[i]=="U"):
        li[i]=21+N
    elif (inputbox1[i]=="V"):
        li[i]=22+N
    elif (inputbox1[i]=="W"):
        li[i]=23+N
    elif (inputbox1[i]=="X"):
        li[i]=24+N
    elif (inputbox1[i]=="Y"):
        li[i]=25+N
    elif (inputbox1[i]=="Z"):
        li[i]=26+N
    
    li[i]=li[i] % 26

for i in range (0,len(inputbox1)):
    if (li[i]==1):
        li2[i]="A"
    elif (li[i]==2):
        li2[i]="B"
    elif (li[i]==3):
        li2[i]="C"
    elif (li[i]==4):
        li2[i]="D"
    elif (li[i]==5):
        li2[i]="E"
    elif (li[i]==6):
        li2[i]="F"
    elif (li[i]==7):
        li2[i]="G"
    elif (li[i]==8):
        li2[i]="H"
    elif (li[i]==9):
        li2[i]="I"
    elif (li[i]==10):
        li2[i]="J"
    elif (li[i]==11):
        li2[i]="K"
    elif (li[i]==12):
        li2[i]="L"
    elif (li[i]==13):
        li2[i]="M"
    elif (li[i]==14):
        li2[i]="N"
    elif (li[i]==15):
        li2[i]="O"
    elif (li[i]==16):
        li2[i]="P"
    elif (li[i]==17):
        li2[i]="Q"
    elif (li[i]==18):
        li2[i]="R"
    elif (li[i]==19):
        li2[i]="S"
    elif (li[i]==20):
        li2[i]="T"
    elif (li[i]==21):
        li2[i]="U"
    elif (li[i]==22):
        li2[i]="V"
    elif (li[i]==23):
        li2[i]="W"
    elif (li[i]==24):
        li2[i]="X"
    elif (li[i]==25):
        li2[i]="Y"
    elif (li[i]==0):
        li2[i]="Z"

for i in range (0,len(inputbox1)):
    ans = ans + li2[i]

print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
input1 = input()
inputbox1 = list(input1)

li=[0] * 1000
li2=[0] * 1000
ans :str =""
for i in range (0,len(inputbox1)):
    if (inputbox1[i]=="A"):
        li[i]=1+N
    elif (inputbox1[i]=="B"):
        li[i]=2+N
    elif (inputbox1[i]=="C"):
        li[i]=3+N
    elif (inputbox1[i]=="D"):
        li[i]=4+N
    elif (inputbox1[i]=="E"):
        li[i]=5+N
    elif (inputbox1[i]=="F"):
        li[i]=6+N
    elif (inputbox1[i]=="G"):
        li[i]=7+N
    elif (inputbox1[i]=="H"):
        li[i]=8+N
    elif (inputbox1[i]=="I"):
        li[i]=9+N
    elif (inputbox1[i]=="J"):
        li[i]=10+N
    elif (inputbox1[i]=="K"):
        li[i]=11+N
    elif (inputbox1[i]=="L"):
        li[i]=12+N
    elif (inputbox1[i]=="M"):
        li[i]=13+N
    elif (inputbox1[i]=="N"):
        li[i]=14+N
    elif (inputbox1[i]=="O"):
        li[i]=15+N
    elif (inputbox1[i]=="P"):
        li[i]=16+N
    elif (inputbox1[i]=="Q"):
        li[i]=17+N
    elif (inputbox1[i]=="R"):
        li[i]=18+N
    elif (inputbox1[i]=="S"):
        li[i]=19+N
    elif (inputbox1[i]=="T"):
        li[i]=20+N
    elif (inputbox1[i]=="U"):
        li[i]=21+N
    elif (inputbox1[i]=="V"):
        li[i]=22+N
    elif (inputbox1[i]=="W"):
        li[i]=23+N
    elif (inputbox1[i]=="X"):
        li[i]=24+N
    elif (inputbox1[i]=="Y"):
        li[i]=25+N
    elif (inputbox1[i]=="Z"):
        li[i]=26+N
    
    li[i]=li[i] % 26

for i in range (0,len(inputbox1)):
    if (li[i]==1):
        li2[i]="A"
    elif (li[i]==2):
        li2[i]="B"
    elif (li[i]==3):
        li2[i]="C"
    elif (li[i]==4):
        li2[i]="D"
    elif (li[i]==5):
        li2[i]="E"
    elif (li[i]==6):
        li2[i]="F"
    elif (li[i]==7):
        li2[i]="G"
    elif (li[i]==8):
        li2[i]="H"
    elif (li[i]==9):
        li2[i]="I"
    elif (li[i]==10):
        li2[i]="J"
    elif (li[i]==11):
        li2[i]="K"
    elif (li[i]==12):
        li2[i]="L"
    elif (li[i]==13):
        li2[i]="M"
    elif (li[i]==14):
        li2[i]="N"
    elif (li[i]==15):
        li2[i]="O"
    elif (li[i]==16):
        li2[i]="P"
    elif (li[i]==17):
        li2[i]="Q"
    elif (li[i]==18):
        li2[i]="R"
    elif (li[i]==19):
        li2[i]="S"
    elif (li[i]==20):
        li2[i]="T"
    elif (li[i]==21):
        li2[i]="U"
    elif (li[i]==22):
        li2[i]="V"
    elif (li[i]==23):
        li2[i]="W"
    elif (li[i]==24):
        li2[i]="X"
    elif (li[i]==25):
        li2[i]="Y"
    elif (li[i]==0):
        li2[i]="Z"

for i in range (0,len(inputbox1)):
    ans = ans + li2[i]

print(ans)

Submission status: Runtime Error

Solution code:
num = int(input())
str_ls = list(input().split())

ans_ls = []
for x in str_ls:
    i = lambda x: ord(x)
    ii = int(i)
    if ii >= 90:
        ans_ls.append(i)
    else:
        ans_ls.append(i - 26)
ls = []
for y in ans_ls:
    l = lambda y : chr(y)
    ls.append(i)

ans = join(ls)
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
input1 = input()
inputbox1 = list(input1)

li=[0] * 1000
li2=[0] * 1000
ans :str =""
for i in range (0,len(inputbox1)):
    if (inputbox1[i]=="A"):
        li[i]=1+N
    elif (inputbox1[i]=="B"):
        li[i]=2+N
    elif (inputbox1[i]=="C"):
        li[i]=3+N
    elif (inputbox1[i]=="D"):
        li[i]=4+N
    elif (inputbox1[i]=="E"):
        li[i]=5+N
    elif (inputbox1[i]=="F"):
        li[i]=6+N
    elif (inputbox1[i]=="G"):
        li[i]=7+N
    elif (inputbox1[i]=="H"):
        li[i]=8+N
    elif (inputbox1[i]=="I"):
        li[i]=9+N
    elif (inputbox1[i]=="J"):
        li[i]=10+N
    elif (inputbox1[i]=="K"):
        li[i]=11+N
    elif (inputbox1[i]=="L"):
        li[i]=12+N
    elif (inputbox1[i]=="M"):
        li[i]=13+N
    elif (inputbox1[i]=="N"):
        li[i]=14+N
    elif (inputbox1[i]=="O"):
        li[i]=15+N
    elif (inputbox1[i]=="P"):
        li[i]=16+N
    elif (inputbox1[i]=="Q"):
        li[i]=17+N
    elif (inputbox1[i]=="R"):
        li[i]=18+N
    elif (inputbox1[i]=="S"):
        li[i]=19+N
    elif (inputbox1[i]=="T"):
        li[i]=20+N
    elif (inputbox1[i]=="U"):
        li[i]=21+N
    elif (inputbox1[i]=="V"):
        li[i]=22+N
    elif (inputbox1[i]=="W"):
        li[i]=23+N
    elif (inputbox1[i]=="X"):
        li[i]=24+N
    elif (inputbox1[i]=="Y"):
        li[i]=25+N
    elif (inputbox1[i]=="Z"):
        li[i]=26+N
    
    li[i]=li[i] % 26

for i in range (0,len(inputbox1)):
    if (li[i]==1):
        li2[i]="A"
    elif (li[i]==2):
        li2[i]="B"
    elif (li[i]==3):
        li2[i]="C"
    elif (li[i]==4):
        li2[i]="D"
    elif (li[i]==5):
        li2[i]="E"
    elif (li[i]==6):
        li2[i]="F"
    elif (li[i]==7):
        li2[i]="G"
    elif (li[i]==8):
        li2[i]="H"
    elif (li[i]==9):
        li2[i]="I"
    elif (li[i]==10):
        li2[i]="J"
    elif (li[i]==11):
        li2[i]="K"
    elif (li[i]==12):
        li2[i]="L"
    elif (li[i]==13):
        li2[i]="M"
    elif (li[i]==14):
        li2[i]="N"
    elif (li[i]==15):
        li2[i]="O"
    elif (li[i]==16):
        li2[i]="P"
    elif (li[i]==17):
        li2[i]="Q"
    elif (li[i]==18):
        li2[i]="R"
    elif (li[i]==19):
        li2[i]="S"
    elif (li[i]==20):
        li2[i]="T"
    elif (li[i]==21):
        li2[i]="U"
    elif (li[i]==22):
        li2[i]="V"
    elif (li[i]==23):
        li2[i]="W"
    elif (li[i]==24):
        li2[i]="X"
    elif (li[i]==25):
        li2[i]="Y"
    elif (li[i]==26):
        li2[i]="Z"

for i in range (0,len(inputbox1)):
    ans = ans + li2[i]

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
m=[]
d=[["A",0], ["B",1], ["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25]]
 
for j in range(len(s)):
    p=n
    if s[j]=="A":
        m+=d[0+p][0]
    elif s[j]=="B":
        p=1+n
        if 1+n>25:
            p=1+n-26
        m+=d[p][0]
    elif s[j]=="C":
        p=2+n
        if 2+n>25:
            p=2+n-26
        m+=d[p][0]
    elif s[j]=="D":
        p=3+n
        if 3+n>25:
            p=3+n-26
        m+=d[p][0]
    elif s[j]=="E":
        p=4+n
        if 4+n>25:
            p=4+n-26
        m+=d[p][0]
    elif s[j]=="F":
        p=5+n
        if 5+n>25:
            p=5+n-26
        m+=d[p][0]
    elif s[j]=="G":
        p=6+n
        if 6+n>25:
            p=6+n-26
        m+=d[p][0]
    elif s[j]=="H":
        p=7+n
        if 7+n>25:
            p=7+n-26
        m+=d[p][0]
    elif s[j]=="I":
        p=8+n
        if 8+n>25:
            p=8+n-26
        m+=d[p][0]
    elif s[j]=="J":
        p=9+n
        if 9+n>25:
            p=9+n-26
        m+=d[p][0]
    elif s[j]=="K":
        p=10+n
        if 10+n>25:
            p=10+n-26
        m+=d[p][0]
    elif s[j]=="L":
        p=11+n
        if 11+n>25:
            p=11+n-26
        m+=d[p][0]
    elif s[j]=="M":
        p=12+n
        if 12+n>25:
            p=12+n-26
        m+=d[p][0]
    elif s[j]=="N":
        p=13+n
        if 13+n>25:
            p=13+n-26
        m+=d[p][0]
    elif s[j]=="O":
        p=14+n
        if 14+n>25:
            p=14+n-26
        m+=d[p][0]
    elif s[j]=="P":
        p=15+n
        if 15+n>25:
            p=15+n-26
        m+=d[p][0]
    elif s[j]=="Q":
        p=16+n
        if 16+n>25:
            p=16+n-26
        m+=d[p][0]
    elif s[j]=="R":
        p=17+n
        if 17+n>25:
            p=17+n-26
        m+=d[p][0]
    elif s[j]=="S":
        p=18+n
        if 18+n>25:
            p=18+n-26
        m+=d[p][0]
    elif s[j]=="T":
        p=19+n
        if 19+n>25:
            p=19+n-26
        m+=d[p][0]
    elif s[j]=="U":
        p=20+n
        if 20+n>25:
            p=20+n-26
        m+=d[p][0]
    elif s[j]=="V":
        p=21+n
        if 21+n>25:
            p=21+n-26
        m+=d[p][0]
    elif s[j]=="W":
        p=22+n
        if 22+n>25:
            p=22+n-26
        m+=d[p][0]
    elif s[j]=="X":
        p=23+n
        if 23+n>25:
            p=23+n-26
        m+=d[p][0]
    elif s[j]=="Y":
        p=24+n
        if 24+n>25:
            p=24+n-26
        m+=d[p][0]
    elif s[j]=="Z":
        p=25+n
        if 25+n>25:
            p=25+n-26
        m+=d[p][0]
 
 
for i in m:
    print(i,end="")

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
m=[]
d=[["A",0], ["B",1], ["C",2],["D",3],["E",4],
   ["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],
   ["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25]]
 
for j in range(len(s)):
    p=n
    if s[j]=="A":
        m+=d[0+p][0]
    elif s[j]=="B":
        p=1+n
        if 1+n>25:
            p=1+n-26
        m+=d[p][0]
    elif s[j]=="C":
        p=2+n
        if 2+n>25:
            p=2+n-26
        m+=d[p][0]
    elif s[j]=="D":
        p=3+n
        if 3+n>25:
            p=3+n-26
        m+=d[p][0]
    elif s[j]=="E":
        p=4+n
        if 4+n>25:
            p=4+n-26
        m+=d[p][0]
    elif s[j]=="F":
        p=5+n
        if 5+n>25:
            p=5+n-26
        m+=d[p][0]
    elif s[j]=="G":
        p=6+n
        if 6+n>25:
            p=6+n-26
        m+=d[p][0]
    elif s[j]=="H":
        p=7+n
        if 7+n>25:
            p=7+n-26
        m+=d[p][0]
    elif s[j]=="I":
        p=8+n
        if 8+n>25:
            p=8+n-26
        m+=d[p][0]
    elif s[j]=="J":
        p=9+n
        if 9+n>25:
            p=9+n-26
        m+=d[p][0]
    elif s[j]=="K":
        p=10+n
        if 10+n>25:
            p=10+n-26
        m+=d[p][0]
    elif s[j]=="L":
        p=11+n
        if 11+n>25:
            p=11+n-26
        m+=d[p][0]
    elif s[j]=="M":
        p=12+n
        if 12+n>25:
            p=12+n-26
        m+=d[p][0]
    elif s[j]=="N":
        p=13+n
        if 13+n>25:
            p=13+n-26
        m+=d[p][0]
    elif s[j]=="O":
        p=14+n
        if 14+n>25:
            p=14+n-26
        m+=d[p][0]
    elif s[j]=="P":
        p=15+n
        if 15+n>25:
            p=15+n-26
        m+=d[p][0]
    elif s[j]=="Q":
        p=16+n
        if 16+n>25:
            p=16+n-26
        m+=d[p][0]
    elif s[j]=="R":
        p=17+n
        if 17+n>25:
            p=17+n-26
        m+=d[p][0]
    elif s[j]=="S":
        p=18+n
        if 18+n>25:
            p=18+n-26
        m+=d[p][0]
    elif s[j]=="T":
        p=19+n
        if 19+n>25:
            p=19+n-26
        m+=d[p][0]
    elif s[j]=="U":
        p=20+n
        if 20+n>25:
            p=20+n-26
        m+=d[p][0]
    elif s[j]=="V":
        p=21+n
        if 21+n>25:
            p=21+n-26
        m+=d[p][0]
    elif s[j]=="W":
        p=22+n
        if 22+n>25:
            p=22+n-26
        m+=d[p][0]
    elif s[j]=="X":
        p=23+n
        if 23+n>25:
            p=23+n-26
        m+=d[p][0]
    elif s[j]=="Y":
        p=24+n
        if 24+n>25:
            p=24+n-26
        m+=d[p][0]
    elif s[j]=="Z":
        p=25+n
        if 25+n>25:
            p=25+n-26
        m+=d[p][0]
 
 
for i in m:
    print(i,end="")

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1
S1 = alpha2num(S)
l = []
for _ in S1:
    l.append(_)
N_list = []
for _ in len(S):
    N_list.append(N)
import numpy as np
l1 = np.array(l)
N_list1 = np.array(N_list)
ans = l1 + N_list1
ans1 = num2alpha(ans)
ans1.sort()
print(ans1)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
leng=len(s)
slist=[s]
#print(slist)
alphabet=["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
#print(alphabet)
for i in range(0,leng):
    for j in range(0,26):
#        print(s[i])
#        print(alphabet[j])
        if s[i]==alphabet[j]:
            slist[i]=alphabet[j+n]
#            print(slist[i])

print(slist)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
leng=len(s)
slist=[s]
#print(slist)
alphabet=["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
#print(alphabet)
for i in range(0,leng):
    for j in range(0,26):
        print(s[i])
#        print(alphabet[j])
        if s[i]==alphabet[j]:
            slist[i]=alphabet[j+n]
#            print(slist[i])

print(slist)

Submission status: Runtime Error

Solution code:
import string

if __name__ == "__main__":
    N = int(input())
    S = input()
    abc_list = [chr(i) for i in range(65, 65+26)]

    ret = ""
    for i in S:
        for j in range(len(abc_list)-1):
            if i == abc_list[j-1]:
                if j + N == len(abc_list)-1:
                    j = j + N - len(abc_list) -1
                    ret += abc_list[j + N-1]
                else:
                    ret += abc_list[j + N-1]
    print(ret)

Submission status: Runtime Error

Solution code:
import string

if __name__ == "__main__":
    N = int(input())
    S = input()
    abc_list = [chr(i) for i in range(65, 65+26)]

    ret = ""
    for i in S:
        for j in range(len(abc_list)-1):
            if i == abc_list[j-1]:
                if j + N == len(abc_list):
                    j = j + N - len(abc_list) -1
                    ret += abc_list[j + N-1]
                else:
                    ret += abc_list[j + N-1]
    print(ret)

Submission status: Runtime Error

Solution code:
import string
alphabetStr = string.ascii_uppercase
al =alphabetStr*2

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

for i in s:
  l=al[al.index(s[i])+n]
  s[i]=l

print(s)

Submission status: Runtime Error

Solution code:
def f(N,S):
    alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    ret_s = ""
    for s in S:
        num = (alpha.index(str(s)) + N)
        if num <= 25:
            pass
        else:
            num = num-(num//25)*25-1
        ret_s += alpha[num]
    return print(ret_s)

N = input()
S = input()
f(N,S)

Submission status: Runtime Error

Solution code:
a=int(input())
s=input()
list= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
slist = [*s]
ans = str()
for si in slist:
    i = list.find(si)
    ans += list[(i+a)%26]
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(input(''))
a = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b = 0
for i in range(len(s)):
    for j in range(len(a)):
        if s[i] == a[j]:
            if j+n > len(a)-1:
                s[i] = a[j+n-len(a)]
                print(s)
                break
            else:
                s[i] = a[j+n]
                print(s)
                break
print(''.join(s))

Submission status: Runtime Error

Solution code:
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if a+c[i]>25:
      z=a+c[i]-25
      p=c[z]
    else:
    
      z=c[i]+a
      p=c[z]
  else:
    pass
print(p)

Submission status: Runtime Error

Solution code:
import string
alphabetStr = string.ascii_uppercase
al =alphabetStr

n=int(input())
s=input

for i in s:
  l=al[al.index(s[i])+n]
  s[i]=l

print(s)

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(al)):
        if str(S[i]) == str(al[j]):
            S.replace(str(S[i]), str(al[j + N]))
S.sort()
print(S)

Submission status: Runtime Error

Solution code:
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      z=c[i]-25
      p=c[z]
    else:
    
      z=c[c[i]+a]
      p=c[z]
  else:
    pass
print(p)

Submission status: Runtime Error

Solution code:
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      z=c[i]-25
      p=c[z]
    else:
    
      z=c[c[i]+a]
      p=c[z]
  else:
    pass
  print(c[p])

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]

print(''.join(tmp))

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(al)):
        if S[i] == al[j]:
            S.replace(str(S[i]), str(al[j + N]))
S.sort()
print(S)

Submission status: Runtime Error

Solution code:
a=int(input())
p=list[]
c=list['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
b=input()
for i in c:
  if i==b:
    if c[i]>25:
      p=c[i]-25
    else:
      p=c[c[i]+a]
  print(c[p])

Submission status: Runtime Error

Solution code:
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(alpha_lst.index(i)+n)%26] for i in s]

print(''.join(tmp))

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(al)):
        if S[i] == al[j]:
            S.replace(S[i], al[j + N])
S.sort()
print(S)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
Sr = []

al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

for i in range(len(S)):
  m = al.index(S[i])
  n = (1 + n + N) % 26 - 1
  Sr.append(al[n])
  
print(''.join(Sr))

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()

for i in range(n):
  alp = s[i]
  for j in range(26):
    if alps[j] == alp:
      number = (j + n) % 26
      ans += alps[number]

print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
lst=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','X','Y','Z']
S=list(s)
for i in range(len(list(s))):
  idx=lst.index(S[i])
  S[i]=lst[(idx+n)%len(lst)]
t=''.join(S)
print(t)

Submission status: Runtime Error

Solution code:
a = input().splitlines()

N = int(a[0])
S = a[1]

alpha_dict = {chr(c): i+1 for i, c in enumerate(range(ord('A'), ord('Z')+1))}

st =""

for c in S:
    n = alpha_dict[c]
    n = n + N
    if (n > 26):
        n = n - 26
    keys = [k for k, v in alpha_dict.items() if v == n]
    st += str(keys[0])
    
print(st)

Submission status: Runtime Error

Solution code:
alphabet = ('A','B','C','D','E','F','G','H','I','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z')

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

out_S = ''

for s in S:
  index = alphabet.index(s)
  if index < 25 - N:
    out_S += alphabet[alphabet.index(s) + N]
  else:
    out_S += alphabet[alphabet.index(s) + N - 25]

print(out_S)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
S_=[]
T=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']

for j in range(len(S)):
    for i in range(len(T)):
        if S[j] == T[i]:
            S_.append(T[i+N])
            break

print(S_)

Submission status: Runtime Error

Solution code:
a = input().split()

N = int(a[0])
S = a[1]

alpha_dict = {chr(c): i+1 for i, c in enumerate(range(ord('A'), ord('Z')+1))}

st =""
o = []
for c in S:
    # print(c)
    n = alpha_dict[c]
    n = n + N
    if (n > 26):
        n = n - 26
    # print(n)
    keys = [k for k, v in alpha_dict.items() if v == n]
    st += str(keys[0])
    #o.append(keys)
    # print(alpha_dict[n])


print(st)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    if S[i]>26:
        S[i]=S[i]-26
    S[i]=A[S[i]]

print("".join(S))

Submission status: Runtime Error

Solution code:
N = int(input())
S = str(input())
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
    for j in range(len(al)):
        if S[i] == al[j]:
            S[i] = al[j + N]
print(S)

Submission status: Runtime Error

Solution code:
a = input().split()

N = int(a[0])
S = a[1]

alpha_dict = {chr(c): i+1 for i, c in enumerate(range(ord('A'), ord('Z')+1))}

st =""
o = []
for c in S:
    # print(c)
    n = alpha_dict[c]
    n = n + 2
    if (n > 26):
        n = n - 26
    # print(n)
    keys = [k for k, v in alpha_dict.items() if v == n]
    st += str(keys[0])
    #o.append(keys)
    # print(alpha_dict[n])


print(st)

Submission status: Runtime Error

Solution code:
N=int(input())
S=input()
A=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','t','u','v','w','x','y','z']
A=[i.upper() for i in A]
print(A)
S=list(S)
for i, a in enumerate(S):
    S[i]=A.index(a)+N
    S[i]=A[S[i]]

print("".join(S))

Submission status: Runtime Error

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

ans=[]
for i in S:
    if ord(i)+N>90:
        temp=chr(ord(i)+N-26)
        ans.append(temp)
    else:
        temp=chr(ord(i)+N)
        ans.append(temp)

f=''.join(ans)

print(f)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
base_list = np.array(['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'])
dict_list = []
dict_list.append(base_list)
for i in range(25):
    tmp_char = dict_list[i][0]
    tmp_list = dict_list[i][1:]
    tmp_list = np.append(tmp_list,tmp_char)
    dict_list.append(tmp_list)

def print_ans(N, sr):
    """Test Case
    >>> print_ans(2, ['A', 'B', 'C', 'X', 'Y', 'Z'])
    CDEZAB
    >>> print_ans(0, ['A', 'B', 'C','X', 'Y', 'Z'])
    ABCXYZ
    """
    idx_list = []
    for s in sr:
        tmp = np.where(base_list == s)[0]
        idx_list.append(int(tmp))
    ans = ''.join(dict_list[N][idx_list])
    print(ans)

if __name__ == '__main__':
    N = int(input().rstrip())
    tmp_s= input().rstrip()
    sr = []
    for s in tmp_s:
        sr.append(s)
    print_ans(N, sr)

Submission status: Runtime Error

Solution code:
n=int(input())
s=input().strip()
a='ABCDEFGHIJKLMNLPQRSTUVWXYZ'
aa = dict()
for i, c in enumerate(a):
    aa[c] = i
def f(c):
    return a[(aa[c] + n)%26]

r = ''
for c in s:
    r += f(c)
print(r)

Submission status: Runtime Error

Solution code:
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = int(input())

S = input()
A = []

for i in range(len(S)):
  B = AL.index(S[i])+N
  A.append(AL[B])
  
for j in range(len(S)):
  print(A[j], end='')

Submission status: Runtime Error

Solution code:
s = [input() for i in range(2)]
N = int(s[0])
S = list(s[1])
eng = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
idx = np.array([eng.index(S[i]) for i in range(len(S))])
N_l = np.array([N]*len(S))
new_idx = idx + N_l
ans = [eng[i] for i in new_idx]
fin_ans = ''
for x in ans:
    fin_ans += x
print(fin_ans)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
base_list = np.array(['A','B','C','D','E','F','G','F','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'])
dict_list = []
dict_list.append(base_list)
for i in range(25):
    tmp_char = dict_list[i][0]
    tmp_list = dict_list[i][1:]
    tmp_list = np.append(tmp_list,tmp_char)
    dict_list.append(tmp_list)

def print_ans(N, sr):
    """Test Case
    >>> print_ans(2, ['A', 'B', 'C', 'X', 'Y', 'Z'])
    CDEZAB
    >>> print_ans(0, ['A', 'B', 'C','X', 'Y', 'Z'])
    ABCXYZ
    """
    idx_list = []
    for s in sr:
        tmp = np.where(base_list == s)[0]
        idx_list.append(int(tmp))
    print(''.join(dict_list[N][idx_list]))

if __name__ == '__main__':
    N = int(input().rstrip())
    tmp_s= input().rstrip()
    sr = []
    for s in tmp_s:
        sr.append(s)
    print_ans(N, sr)

Submission status: Runtime Error

Solution code:
# 数字
N = int(input())

# 文字
S = input()

AAA = ""

for char in list(S):
    hoge = ord(char)
    huga = hoge - 97
    huga = (huga + N) % 26
    hoge = num + 97
    AAA += chr(hoge)

print()

Submission status: Runtime Error

Solution code:

# 整数の入力
a = int(input())

# 文字列の入力
S = str(input())

chr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
SS = []

for k in range(len(S)):
    for j in range(len(chr)):
        if S[k] == chr[j]:
            if (j+a) >= 25:
                SS += chr[j+a-25]
            else:
                SS += chr[j+a]

SS = ''.join(SS)

print(SS)

Submission status: Runtime Error

Solution code:
N = input()
S = input()
t = []
for i in S:
    if ord(i) + N >= 91:
        t.append(chr(ord(i) + N - 26))
    else:
        t.append(chr(ord(i) + N))
print(''.join(t))

Submission status: Runtime Error

Solution code:
n=int(input())
l=[]
pos={}
for i in range(ord('A'),ord('Z')+1):
  l.append(chr(i))
  pos[chr(i)]=len(l)-1
for i in input():
  print(l[(pos(i)+n)%26],end="")

Submission status: Runtime Error

Solution code:
a=int(input())
s=list(input())
t=[len(s)]
list=[chr(i) for i in range(65, 65+26)]
for i in s:
  t.append(list.index(i))
u=[i+a for i in t]
u=[i-26 if i>=26 else i for i in u]
b=[]
for i in u :
  b.append(list[i])
k=""
for s in b:
  k+=s
print(k)

Submission status: Runtime Error

Solution code:
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
N = 2
 
S = ABCXYZ
A = []
 
for i in range(len(S)):
  B = AL.index(S[i])+N
  if B >= 26:
    B = B - 26
  A.append(S[B])
  
for j in range(len(S)):
  print(A[j], end='')

Submission status: Runtime Error

Solution code:
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = int(input())

S = input()
A = []

for i in range(len(S)):
  B = AL.index(S[i])+N
  if B >= 26:
    B = B - 26
  A.append(S[B])
  
for j in range(len(S)):
  print(A[j], end='')

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
base_list = np.array(['A','B','C','D','E','F','G','F','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'])
dict_list = []
dict_list.append(base_list)
for i in range(25):
    tmp_char = dict_list[i][0]
    tmp_list = dict_list[i][1:]
    tmp_list = np.append(tmp_list,tmp_char)
    dict_list.append(tmp_list)

def print_ans(N, sr):
    """Test Case
    >>> print_ans(2, ['A', 'B', 'C', 'X', 'Y', 'Z'])
    CDEZAB
    >>> print_ans(0, ['A', 'B', 'C','X', 'Y', 'Z'])
    ABCXYZ
    """
    idx_list = []
    for s in sr:
        tmp = np.where(base_list == s)[0]
        idx_list.append(int(tmp))
    print(''.join(dict_list[N][idx_list]))
    

if __name__ == '__main__':
    N = int(input().rstrip())
    sr = list(map(str, input().rstrip().split('')))
    print_ans(N, sr)

Submission status: Runtime Error

Solution code:
a=int(input())
s=list(input())
t=[len(s)]
list=[chr(i) for i in range(65, 65+26)]
for i in s:
  t.append(list.index(i))
u=[i+a for i in t]
u=[i-26 if i>26 else i for i in u]
b=[]
for i in u :
  b.append(list[i])
k=""
for s in b:
  k+=s
print(k)

Submission status: Runtime Error

Solution code:
N = input()
S = input()
t = []
for i in S:
    if ord(i) + N >= 91:
        t.append(chr(ord(i) + N - 26))
    else:
        t.append(chr(ord(i) + N))
print(t)