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:
al=[]
al=[chr(i) for i in range(65, 65+26)]

n=int(input())
s=input()
ans=""
i=0

while i < len(s):
	j=0
	while j < len(s):
		if s[i] == al[j]:
		    next=j+n
		    if next > 26:
                next-=26
			ans = ans + al[next]
			break
		j += 1
	i+=1

print(ans)

Submission status: Runtime Error

Solution code:
al=[]
al=[chr(i) for i in range(65, 65+26)]

n=int(input())
s=input()
ans=""
i=0

while i < len(s):
	j=0
	while j < len(s):
		if s[i] == al[j]:
			ans = ans + al[j+n]
			break
		j += 1
	i+=1

print(ans)

Submission status: Runtime Error

Solution code:
# input() は 'python3' で正常に動く
N = int(input())
S = input()

str_list = list(S)
str_trsf = []

for item in str_list:
    str_trsf.extend(chr(N - (ord('Z') - ord(item)) + ord('A') if ord(item) + N > ord('Z') else chr(ord(item) + N)))

print(''.join(str_trsf))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S)):
    if a.index(S[i]) + N > 26:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)

Submission status: Runtime Error

Solution code:


N= input()
S= input()







Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。

ANSWER = ""
#リストの中身をループ
for SS in LIST:
    NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
    NUNBER = NUNBER -65#アスキーコードからアルファベット順に変更
    AFFTER = NUNBER + N
    LAST  = AFFTER % 26
   # if LAST == 0:
    #    LAST = 26
    LAST  = chr(LAST+65)#アスキーコードからアルファベットに戻す
    ANSWER = ANSWER + LAST
    
print(ANSWER)

Submission status: Runtime Error

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



Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。

ANSWER = ""
#リストの中身をループ
for SS in LIST:
    NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
    NUNBER = NUNBER -64#アスキーコードからアルファベット順に変更
    AFFTER = NUNBER + N
    LAST  = AFFTER % 26
    if LAST == 0:
        LAST = 26
    LAST  = chr(LAST+64)#アスキーコードからアルファベットに戻す
    ANSWER = ANSWER + LAST
    
print(ANSWER)

Submission status: Runtime Error

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

Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。

ANSWER = ""
#リストの中身をループ
for SS in LIST:
    NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
    NUNBER = NUNBER -64#アスキーコードからアルファベット順に変更
    AFFTER = NUNBER + N
    LAST  = AFFTER % 26
    LAST  = chr(LAST+64)#アスキーコードからアルファベットに戻す
    ANSWER = ANSWER + LAST
    
print(ANSWER)

Submission status: Runtime Error

Solution code:
alph = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXY'
n = int(input())
s = input()
ans = ''
for i in s:
        pos = alph.index(i)
        ans += alph[pos + n]
print(ans)

Submission status: Runtime Error

Solution code:
S = input()
offset = int(input())
ans = ""

for i in S:
    c = ord(i) + offset
    if c > 122:
        c -= 25

    c = chr(c)
    ans += c

print(ans)

Submission status: Runtime Error

Solution code:
S = input()
offset = int(input())

for i in S:
    c = ord(i) + offset
    if c > 122:
        c -= 25

    c = chr(c)
    print(c, end='')
print('')

Submission status: Runtime Error

Solution code:
S = input()
offset = int(input())

for i in S:
    c = ord(i) + offset
    if c > 122:
        c -= 25

    c = chr(c)
    print(c, end='')
print()

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
w = ""
for x in S:
    if abc.index(x) + N > 26:
        w += abc[abc.index(x) + N - 26]
    else:
        w += abc[abc.index(x) + N]
print(w)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
alphaList  =   ["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"]
moji = ""
for str in s:
    index = alphaList.index(str)
    addNum = 0
    if index == 24:
        addNum = 0
    elif index ==  25:
        addNum = 1
    else:
        addNum = index + n 
    moji = moji + alphaList[addNum]
print(moji)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
alphaList  =   ["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"]
moji = ""
for str in s:
    index = alphaList.index(str)
    addNum = 0
    if index == 24:
        addNum = 0
    elif index ==  25:
        addNum = 1
    else:
        addNum = index + n 
        print(addNum)
    moji = moji + str.replace(str, alphaList[addNum])
print(moji)

Submission status: Runtime Error

Solution code:

num = input()
s = input()
res = ""
for x in s:
    loc = ord(x) + num
    res += chr(loc - 26 if loc > 90 else loc)
print(res)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
k = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(n):
  s.replace(s[i], k[k.index(s[i])+2])
print(s)

Submission status: Runtime Error

Solution code:
num = int(input())
base_str = input()
alphabets = ['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']
def replacer(letter, num):
    letter_index = alphabets.index(letter)
    return(alphabets[(letter_index+num)%27])
answer = []
for i in range(len(base_str)):
    answer.append(replacer(base_str[i], num))
answer = ''.join(answer)
print(answer)

Submission status: Runtime Error

Solution code:
base_str = input()
num = int(input())
alphabets = ['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']
def replacer(letter, num):
    letter_index = alphabets.index(letter)
    return(alphabets[(letter_index+num)%27])
answer = []
for i in range(len(base_str)):
    answer.append(replacer(base_str[i], num))
answer = ''.join(answer)
print(answer)

Submission status: Runtime Error

Solution code:
base_str = input()
num = int(input)
alphabets = ['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']
def replacer(letter, num):
    letter_index = alphabets.index(letter)
    return(alphabets[(letter_index+num)%27])
answer = []
for i in range(len(base_str)):
    answer.append(replacer(base_str[i], num))
answer = ''.join(answer)
print(answer)

Submission status: Runtime Error

Solution code:
import codecs

n = input()
s = input()

codecs.decode(s,'rot'+ n)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
A = [chr(ord('A') + i) for i in range(26)]
for i in range(len(S)):
    res = A.index(S[i]) + N
    if res > 25:
        res -= 25
    print(A[res], end = '')

Submission status: Runtime Error

Solution code:
n=input()
s=input()
s2=list(s)
for i in range(len(s2)):
    a=ord(s2[i])+n
    if a>90:
        a-=26
    s2[i]=chr(a)
print(''.join(s2))

Submission status: Runtime Error

Solution code:
import string
A = list(string.ascii_uppercase)
N = int(input()) % 26
S = input()
Output = ''
for i in range(len(S)):
    for j in range(len(A)):
        if A[j] == S[i]:
            Output += A[j+N]
print(Output)

Submission status: Runtime Error

Solution code:
def solve(n: int, s: str) -> str:
    def inc(c: str, n: int) -> str:
        tbl = {
            0: 'A',
            1: 'B',
            2: 'C',
            3: 'D',
            4: 'E',
            5: 'F',
            6: 'G',
            7: 'H',
            8: 'I',
            9: 'J',
            10: 'K',
            11: 'L',
            12: 'M',
            13: 'N',
            14: 'O',
            15: 'P',
            16: 'Q',
            17: 'R',
            18: 'S',
            19: 'T',
            20: 'U',
            21: 'V',
            23: 'W',
            24: 'X',
            25: 'Y',
            26: 'Z',
        }
        rev_tbl = {v: k for k, v in tbl.items()}
        idx = (rev_tbl[c] + n) % len(tbl)
        return tbl[idx]

    return ''.join([inc(c, n) for c in s])


n = int(input().strip())
s = input().strip()
print(solve(n, s))

Submission status: Runtime Error

Solution code:
num = int(input())
str = list(input())
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
out=""
for i in range(len(str)):
	for l in range(len(alp)):
		if str[i]==alp[l]:
			out+=alp[l+num]
			break
print(out)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

#print(s)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

print(s)    
    
#for i in range(len(s)):
#	s2[i] = l2[s1[i]+n] 

#print(s)    
    
#リスト１つずつくっつけて文字列にする
#ans = ''
#for i in range(len(s2)):
#	ans = ans + s2[i]

#print(ans)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

#print(s)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

print(s)    
    
#リスト１つずつくっつけて文字列にする
#ans = ''
#for i in range(len(s2)):
#	ans = ans + s2[i]

#print(ans)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

#print(s)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
	ans = ans + s2[i]

print(ans)

Submission status: Runtime Error

Solution code:
S = input()
N = int(input())
n = int(N%26)

l = len(S)
i = 0
ans = ' '

while l:
    if S[i] == 'z':
        tmp = S.replace(S[i],chr(ord('a') + n - 1))
    else:
        tmp = S.replace(S[i],chr(ord(S[i])+ n))
    ans += tmp[i]
    i += 1
    l -= 1

print(ans)

Submission status: Runtime Error

Solution code:
S = input()
N = int(input())
n = N%26

l = len(S)
i = 0
ans = ' '

while l:
    if S[i] == 'z':
        tmp = S.replace(S[i],chr(ord('a') + n - 1))
    else:
        tmp = S.replace(S[i],chr(ord(S[i])+ n))
    ans += tmp[i]
    i += 1
    l -= 1

print(ans)

Submission status: Runtime Error

Solution code:
S = input()
N = int(input())
n = N%26

l = len(S)
i = 0
ans = ""

while l:
    if S[i] == 'z':
        tmp = S.replace(S[i],chr(ord('a') + n - 1))
    else:
        tmp = S.replace(S[i],chr(ord(S[i])+ n))
    ans += tmp[i]
    i += 1
    l -= 1

print(ans)

Submission status: Runtime Error

Solution code:
N=input()
S=input()
abc=[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]
out=[]
for i in S:
  ind=abc.index(i)
  ind+=2
  if index>26:
    index-=26
  out.append(abc(ind))
print(out)

Submission status: Runtime Error

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

s = []
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
L += L

for i in S:
  s += a[a.find(c) + N]
  
print(*s, sep="")

Submission status: Runtime Error

Solution code:
sl = [i for i in list(__import__('string').ascii_uppercase)] #string list
nl = list(range(26)) #number list
sd = dict(zip(nl, ul)) #                 {0:A}
sd_inv = {i:j for j,i in sd.items()} #  {A:0}

n = int(input()) #問題の入力
s = list(input()) #問題の入力

orig_num = [sd_inv[i]+n for i in s]
ans_num = []
for i in orig_num:
    if i>25:
        a = i-26
    else:
        a = i
    ans_num.append(a)
ans_list = [sd[i] for i in ans_num]
ans = "".join(ans_list)
print(ans)

Submission status: Runtime Error

Solution code:
ul = [i for i in list(__import__('string').ascii_uppercase)]
nl = list(range(26))
ad = dict(zip(nl, ul))
ad_inv = {i:j for j,i in ad.items()}

n = int(input())
s = list(input())
ans = [ad_inv[i]+n for i in s]
ans = [ad[i] for i in ans]
ans = "".join(ans)
print(ans)

Submission status: Runtime Error

Solution code:
ul = [i for i in list(__import__('string').ascii_uppercase)]
nl = list(range(26))
ad = dict(zip(nl, al))
ad_inv = {i:j for j,i in ad.items()}

n = int(input())
s = list(input())
ans = [ad_inv[i]+n for i in s]
ans = [ad[i] for i in ans]
ans = "".join(ans)
print(ans)

Submission status: Runtime Error

Solution code:
ll = [i for i in list(__import__('string').ascii_lowercase)]
ul = [i for i in list(__import__('string').ascii_uppercase)]
al = ll + ul
nl = list(range(52))
ad = dict(zip(nl, al))
ad_inv = {i:j for j,i in ad.items()}

n = int(input())
s = list(input())
ans = [ad_inv[i]+n for i in s]
ans = [ad[i] for i in ans]
ans = "".join(ans)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input()) #n文字サイクルさせる
s = list(input().split()) #元の文字列(全て大文字)
list1 = []
for i in range(s):
    number = (ord(s[i]) + n - ord("A")) %26 + ord("A")
    list1.append(chr(number))

print("".join(list1))

Submission status: Runtime Error

Solution code:
N = input()
str = input()
new_str = ""

for x in str:
  temp = ord(x)+N
  if temp>90:
    str += chr((ord(x)+N) - 26)
  else:
    str += chr(ord(x)+N)

print(new_str)

Submission status: Runtime Error

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

a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" * 2
ans = ""
for i in s:
    ans[i] = a.index(a.index(s[i]) + n)
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
s = inut()
alp = 'ABCDEFGHJKLMNOPQRSTUVWXYZ'
print(a.tanslate(str.maketrans(alp , alp[:n] + alp[n:])))

Submission status: Runtime Error

Solution code:
day = input()
number=int(input())
number = number + 0

alphabet=list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")

myIter =iter(day)
out=list()
for x in myIter:
  
  pos = alphabet.index(x)
  out.append(alphabet[pos + number])

print(''.join(out))

Submission status: Runtime Error

Solution code:
N = int(input())
S = input().strip()
after = []
for s in S:
  x = ord(s) + N
  if x > ord('Z'):
    x = x - ord('Z')
  after.append(chr(x))
print(''.join(x))

Submission status: Runtime Error

Solution code:
N = input()
S= input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
for a in S:
  for i, Alpha in enumerate(Alphas):
    if Alpha == a:
      hoge.append(Alphas[(i+N)%26])
      break
mojiretsu=''
for x in hoge:
    mojiretsu += x
print(mojiretsu)

Submission status: Runtime Error

Solution code:
N=input()
S=input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for a in S:
  for i, Alpha in enumerate(Alphas):
    if Alpha == a:
      hoge.append(Alphas[(i+N)%26])
      break
print(hoge)

Submission status: Runtime Error

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

a = [chr(i) for i in range(65, 65+26)]
b = [chr(i) for i in range(65+N, 65+26)]
for i in range(N):
    b.append(a[i])

a_dict = {}
for i in range(len(a)) :
    a_dict[a[i]] = b[i]
for i in range(len(S)) :
    S[i] = a_dict[S[i]]

print(''.join(S))

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
 
def Calprice(n):
  return a * n + b * len(str(n))
 
min = 0
max = 10 ** 9 + 1
 
while max - min > 1:
  dev = (max + min) // 2
  if Calprice(dev) > x:
    max = dev
  else:
    min = dev

print(min)

Submission status: Runtime Error

Solution code:
import sys

"""[A-Z]"""
az = [chr(i) for i in range(65, 65+26)]

"""inputs"""
lines  = sys.stdin.readlines()
s_num  = int(lines[0])
s_list = list(lines[1])

result = []

"""logic"""
for l in s_list:
  num = az.index(l)
  c = s_num + num
  if c > 25:
    c = c - 25 - 1
  
  result.append(az[c])

"""result"""
print(''.join(result))

Submission status: Runtime Error

Solution code:
n=int(input())
s=input()
l=list(s)
newcome=[]
alp=[chr(ord('A') + i) for i in range(26)]
for i in l:
  a=alp.index(i)
  if (a+n)<=26:
    t=alp[a+n]
  else:
    t=alp[a+n-26]
  newcome.append(t)
print("".join(newcome))

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
a=""
for c in s:
  a+=chr((ord(c)-ord(a)+n)%26+ord(a))
print(a)

Submission status: Runtime Error

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

for i in list(S):
    num = ord(i)+N
    if num >= 65 || num =< 90:
        Answer_list.append(chr(num))
    elif num < 90:
        Answer_list.append(chr(num - 26)        
print(''.join(Answer_list))

Submission status: Runtime Error

Solution code:

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

# ordで文字からunicode数字を返す
# chrでunicode数字から文字を返す

def chr_change(chr, N):
    """ print("chr is", chr)
    print("N is", N)
    print("ord(chr) is ", ord(chr))
     """
    Num_AtoZ = ord("Z") - ord("A")
    if ord(chr) + N > ord("Z"):
        chg_chr = ord(chr) + N - Num_AtoZ -1
    else:
        chg_chr = ord(chr) + N
    #print("chg_chr is", chg_chr)
    return chg_chr


for i in range(N):
    tmp_chr = S[i]
    print(chr(chr_change(tmp_chr, N)), end = "")
print("\n")

Submission status: Runtime Error

Solution code:
N = int(input())
S = input("")
result = ""
size = len(S)
for i in range(size):
    if i + N < size:
        result += S[i + N]
    else:
        result += S[i + N - size]
print(result)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input("")
result = str()
size = len(S)
for i in range(size):
    if i + N < size:
        result += S[i + N]
    else:
        result += S[i + N - size]
print(result)

Submission status: Runtime Error

Solution code:
N = int(input())
S = input("")
result = str()
size = len(S)
for i in range(size):
    if i + N < size:
        result += S[i + N]
    else:
        result += S[i + N - size]
print(result

Submission status: Runtime Error

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

l="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
out=""

for i in S:
    out += l[(l.index(i)+n)%26]

print(out)

Submission status: Runtime Error

Solution code:
n = int(input())
S = input()
A = []

for i in range(len(S)):
    if i + n < len(S):
        A.append(S[i + n])
    else:
        A.append(S[i + n - len(S)])

print(''.join(A))

Submission status: Runtime Error

Solution code:
N = int(input())
res = ""

for i in list(input()):
    ascii = ord(i)
    n = ascii - 65
    n = (n + N) % 26
    res += chr(n + 65)
print(res == input())

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
res = ""

for i in list(input()):
    ascii = ord(i)
    n = ascii - 65
    n = (n + N) % 26
    res += chr(n + 65)
print(res == input())

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

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

ans = ""
for a in S:
    ans += chr((ord(a) + N) % 26 + ard("A"))

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
for i in range(len(s)):
  c = (ord(s[i]) + n - ord('A')) % 26
  c += ord('A')
  s[i] = chr(c)
 print(s)

Submission status: Runtime Error

Solution code:
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
alphabet += alphabet
n = int(input())
s = input()
res = alphabet[alphabet.index(_) + n] for _ in s
print(res)

Submission status: Runtime Error

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

print(s)
s = list(s)

print(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

print(l1)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
	ans = ans + s2[i]

print(ans)

Submission status: Runtime Error

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

s = list(s)

print(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

print(l1)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
	ans = ans + s2[i]

print(ans)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

print(l1)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
	ans = ans + s2[i]

print(ans)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
	ans = ans + s2[i]

print(ans)

Submission status: Runtime Error

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

s = list(s)

l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)

l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)

s1 = [0]*len(s)
s2 = [0]*len(s)

for i in range(len(s)):
	s1[i] = l1.index(s[i])

for i in range(len(s)):
	s2[i] = l2[s1[i]+n] 

#リスト１つずつくっつけて文字列にする
ans = ''.join(s2)
	
print(ans)

Submission status: Runtime Error

Solution code:
S=list(input())
N=int(input())
P=list()
jia= N%26
for i in range(len(S)):
  xin= ord(S[i])+jia
  if xin > ord("Z"):
   xin-=26
  zimu=chr(xin)
  P+=zimu
p=''.join(P)
print(p)

Submission status: Runtime Error

Solution code:
N = int(raw_input())
S = raw_input
I = map(ord, S)
I_shifted = map(lambda x: x+N if x+N<91 else x+N-26, I)
print map(chr, I_shifted)

Submission status: Runtime Error

Solution code:
input_number = int(input())
input_str = input()
abc_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc_list = abc_list + abc_list
for i in len(input_str):
    output_str += abc_list[abc_list.index(input_str[i]) + input_number]
print(output_str)

Submission status: Runtime Error

Solution code:
input_number = int(input())
input_str = input()
abc_list = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc_list = abc_list + abc_list
for i in len(input_str):
    output_str += abc_list[abc_list.index(input_str[i]) + input_number]

Submission status: Runtime Error

Solution code:
n=int(input())
n=n%26
s=input()
out=""
for i in s:
  no=ord(i)+n
  if no>ord("Z"):
    no=no-ord("Z")+ord("A")-1
  out+=ord(no)
print(out)

Submission status: Runtime Error

Solution code:
N=int(input())
S=list(input())
c=["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"]
d=[]
Z=c*N
for i in range(len(c)):
  for k in range(len(S)):
    if Z[i]==S[k]:
      d.append(Z[i+N])
print("".join(d))

Submission status: Runtime Error

Solution code:
arphs = list(ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ)
n = int(input())
s = list(input())
i = []
for x in s:
  i.append(arphs.index(x) + n)
print("".join(i))

Submission status: Runtime Error

Solution code:
#include "bits/stdc++.h"
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

using ll = long long;

const int INF = 1e9 + 5;

int main() {
  int k;
  string s;
  cin>>k;
  cin>>s;
  for(int i =0 ; i < s.size(); i++){
    int val = s[i] - 'A' +k;
    val %= 26;
    cout<<(char)(val+'A');
  }
  
    
}

Submission status: Runtime Error

Solution code:
import string
n = int(input())
s = input()
for c in s:
  print(string.ascii_uppercase[(ord(c)-ord('A')+n)%26)], end='')
print()

Submission status: Runtime Error

Solution code:
# 2019-11-24 20:59:47(JST)
import sys
from string import ascii_uppercase as alphabet

# alpha_num = dict((alpha, num) for num, alpha in enumerate(alphabet, 0))
alpha_ind = dict((alphabet[i], i) for i in range(26))

def main():
    n, s = sys.stdin.read().split()
    n = int(n)

    t = ''
    for char in s:
        t += alphabet[(alpha_num[char] + n) % 26]
    
    print(t)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
a='abcdefghijklmnopqrstuvwxyz'
n=int(input())
s=input()
s=s.lower()
s=list(s)
for i in range(n):
    d=(ord(s[i])+n)-97
    s[i]=a[d]
s=''.join(s)
s=s.upper()
print(s)

Submission status: Runtime Error

Solution code:
import math

A,B,X = map(int,input().split())

# A * N + B * d(N) yen 

check_num = [1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000]

if((A*1+B*1)>X):
    print(0)
else:
    flag = True
    for i in range(len(check_num)):
        if((A*check_num[i]+B*(i+1)) > X):
            flag = False
            break
    if(flag):
        print(10**9)
    else:
        value = math.ceil((X - B*i)/A)
        print(value-1)

Submission status: Runtime Error

Solution code:
_,s=open(0)
for c in s[:-1]:print(chr(65+(ord(c)-65+n)%26),end='')

Submission status: Runtime Error

Solution code:
N=int(input())
input1 = input()
inputbox1 = list(input1)
li=[None for _ in range(1000)]
li2=[None for _ in range(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:
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 21 15:05:30 2019

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

li=[None for _ in range(1000)]
li2=[None for _ in range(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)