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: Wrong Answer

Solution code:
n = int(input());
s = input();
ans = []

for i in s:
    num = ord(i) + n;
    #正規化
    num = num - ord("a")
    num = num % 26 
    print(num)
    ans.append(chr(num  + ord("a")))

new = ""
for j in ans:
    new += j

print(new.upper())

Submission status: Wrong Answer

Solution code:
n = int(input());
s = input();
ans = []

for i in s:
    num = ord(i) + n;
    #正規化
    num = num - ord("a")
    num = num % 26 
    print(num)
    ans.append(chr(num  + ord("a")))

new = ""
for j in ans:
    new += j

print(new)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

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

k = 0
ans = ""

for i in S:
    j = ord(i) + N
    print(ord(i))
    while j > 90:
        j -= 26
    ans += chr(j)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input(())
a = len(S)
A = chr(ord(S[0])+N)
for i in range(1,a):
  A += chr(ord(S[i])+N)
print(A)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
so = ''
for i in range(len(s)):
    ni = ord(s[i]) + n
    if ni > 122:
        ni -= 26
    so += chr(ni)
print(so)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
l = len(S)
word = ["a"]*l
for i in range(l):
  if ord(S[i]) + N <= 90:
    word[i] = chr(ord(S[i])+N)
  else:
    word[i] = chr(ord(S[i])+N-25)
print("".join(word))

Submission status: Wrong Answer

Solution code:
n = int(input())
S = input()
ans = []
for s in S:
    if s == 'Z':
        ans.append('A')
        continue
    ans.append(chr(ord(s)+1))
ans = "".join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
list='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(s)):
  x=list[(list.index(s[i])+n)%26]
  s.replace(s[i],x)
print(s)

Submission status: Wrong Answer

Solution code:
class RotN:
    def __init__(self):
        self.alphabet = [a for a in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

    def calculate(self, N, S):
        result_list =[]
        for s in S:
            num = self.alphabet.index(s)
            #  アルファベットがZより大きくなる場合
            if num + N > 25:
                tmp = 25 - (num + N)
                result_list.append(self.alphabet[tmp])
            #  アルファベットがZより大きくならない場合
            else:
                tmp = num + N
                result_list.append(self.alphabet[tmp]) 
        return result_list

if __name__ == '__main__':
    N = int(input())
    S = [s for s in input()]
    rn = RotN()
    result_list = rn.calculate(N, S)
    result = ''
    for x in result_list:
        result += x
    print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())
string = str(input())
res = ''
for i in range(len(string)):
	temp = ''
	temp = chr((ord(string[i])+N)%26)
	res += temp 
print(''.join(res))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
ans = ''
for i in range(len(S)):
  temp = ord(S[i]) - ord('A')
  ans += chr(ord("A") + temp%26 )
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
print(len(s))
ans=""
for i in range(len(s)):
    x=(ord(s[i])+n-65)%26+65
    ans=ans+chr(x)
print(ans)

Submission status: Wrong Answer

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

for i in range(len(s)):
  tmp=ord(s[i])
  tmp+=n

  if tmp>90:
    tmp=tmp-90+66
  print(chr(tmp),end="")

print()

Submission status: Wrong Answer

Solution code:
alpha = 'ABCDEFGHIJKLMNOPQRSTUvWXYZ'
n = int(input())
s = input()
ans = ''
for x in s:
    ans += alpha[(alpha.find(x) + n) % 26]
print(ans)

Submission status: Wrong Answer

Solution code:
alpha = 'ABCDEFGHIJKLMNOPQRSTUvWXYZ' * 2
n = int(input())
s = input()
ans = ''
for x in s:
    ans += alpha[alpha.find(x) + n]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = str(input())
  
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
f = ''
 
for i in range(len(s)):
    for j in range(26):
        if s[i] == alp[j]:
            f += alp[j]
print(f)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
alp = [chr(ord('A') + i) for i in range(26)]
ans = []
for a in s:
    i = (alp.index(a) + 2) % 26
    ans.append(alp[i])
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = ''
for i in s:
  ans += chr((ord(i)+n-1 - ord('A'))%26 + 1 + ord('A'))
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = s[:-1] + chr((ord(s[-1])+n-1 - ord('A'))%26 + 1 + ord('A'))
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = s[:-1] + chr((ord(s[-1])+n-1)%26 + 1)
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = input()
chr_a = 0
ans = ''
for i in range(len(b)):
    if ord(b[i]) + a <= 90:
        chr_a = ord(b[i]) + a
    else:
        chr_a = ord(b[i]) + a -25
    ans += chr(chr_a)
print(ans)

Submission status: Wrong Answer

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

ans = []
for i in S:
    s = int(ord(i)) + N
    if s > 90:
        ans.append(chr(s % 90 + 65))
    else:
        ans.append(chr(s % 65 + 65))

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3


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


sli = [ord(c) for c in S]
sli_mod = [n + N for n in sli]
sli_mod2 = [sraw if sraw < ord('Z') else sraw - 26 for sraw in sli_mod]
final = [chr(c) for c in sli_mod2]
out = "".join(final)
print(out)

Submission status: Wrong Answer

Solution code:
n=input()
s=list(input())
for i in range(len(s)):
    ord_s=int(ord(s[i]))
    ord_s+=int(n)
    s[i]=chr(ord_s)
print("".join(s))

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = list(map(str,input()))
r = len(ls)
print(ls)
for i in range(r):
    if ord(ls[i]) + n <= 90:
        ls[i] = chr(ord(ls[i]) + n)
    else:
        ls[i] = chr((ord(ls[i]) + n)%90+64)
a = "".join(ls)
print(a)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=list(input())
s=[]
for i in range(len(b)):
  c=(ord(b[i])-64+a)%26+64
  s.append(chr(c))
print("".join(s))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=list(input())
s=""
for i in range(len(b)):
  c=(ord(b[i])-64+a)%26+64
  s=s+chr(c)
print(s)

Submission status: Wrong Answer

Solution code:
a= int(input())
a = a+ 1
print(a + 1)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ANS=""
for i in range(len(S)):
    ANS+=chr(64+((ord(S[i])+N)-64)%26)
print(ANS)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
x = 0
ans = ""
c = ""

for i in s:
  x = ord(i) + n
  if x > 90:
      x = x - 26
  c = chr((x))
  ans = ans + c
  print(x)

print(ans)

Submission status: Wrong Answer

Solution code:
r = int(input())

print(int(r**2))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = ""
for i in s:
  t = ord(i)
  if t >= 90 - n:
    t = 65 + t - (90 - n)
  else:
    t += n
  ans += chr(t)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
L = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
A = ''
for i in S:
  N = L.index(i)
  if N == 25:
    N = 0
  else:
    N += 1
  A += L[N]
print(A)

Submission status: Wrong Answer

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

for i in range(len(s)):
	print(chr(ord(s[i])+n), end="")

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
num=len(s)
new=""
for i in range(num):
  a=ord(s[i])
  b=a+n
  if b>90:
    new+=chr(b-24)
  else:
    new+=chr(b)
print(new)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
i = 0
R = ""
while i < len(S):
    if S[i] == "Z":
        R = R + chr(ord("A") + (N - 1))
    else:
        R = R + chr(ord(S[i]) + N)
    i += 1 
print(R)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

lst = []
for i in S:
    x = ord(i)
    if x + N > 90:
        x = x - 90 - 1 + 65
    lst.append(chr(int(x) + N))
print(lst)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
strings = [chr(ord(c)+n) if c != "Z" else chr(ord("A")+(n-1)) for c in s]
ans = "".join(strings)
print(ans)

Submission status: Wrong Answer

Solution code:
n = input()
s = raw_input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
r = ""
for i in s:
    r += l[l.index(i)+2]
print r

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
z = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

l = []
for i in range(26):
  if z[i] in s:
    l.append(z[i+n])

print(''.join(l))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
A = ''
for i in range(len(S)):
    if ord(S[i])+N <= 90:
        A += chr(ord(S[i])+N)
        print(A)
    else:
        A += chr(ord(S[i])+N-26)
        print(A)
print(A)

Submission status: Wrong Answer

Solution code:
import sys
import os


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

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

    ret = []
    for s in S:
        n = ord(s) + N
        if n > 90:
            ret.append(chr(n - 26))
        else:
            ret.append(chr(n))

    print("".join(ret), end="")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

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

    ret = []
    for s in S:
        n = ord(s) + N
        if n > 90:
            ret.append(chr(n - 26))
        else:
            ret.append(chr(n))

    print("".join(ret))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

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

    ret = []
    for s in S:
        n = chr(65 + (ord(s) - 65 + N) % 26)
        ret.append(n)

    print("".join(ret))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

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

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    test = []
    for s in S:
        n = ord(s) - 65 + N
        test.append(chr(65 + n % 26))

    print("".join(ret), end="")
    # print("".join(test))
    # print("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = str(sys.stdin.readline())

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    test = []
    for s in S:
        n = ord(s) - 65 + N
        test.append(chr(65 + n % 26))

    print("".join(ret), end="")
    # print("".join(test))
    # print("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = str(sys.stdin.readline())

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    test = []
    for s in S:
        n = ord(s) - 65 + N
        test.append(chr(65 + n % 26))

    print("".join(ret))
    # print("".join(test))
    # print("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

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

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    test = []
    for s in S:
        n = ord(s) - 65 + N
        test.append(chr(65 + n % 26))

    print("".join(ret))
    # print("".join(test))
    # print("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = list(sys.stdin.readline())

    # ret = []
    # for s in S:
    #     n = ord(s) + N
    #     ret.append(chr(((n - 65)%26)+65))
    #
    # test = []
    # for s in S:
    #     n = ord(s) - 65 + N
    #     test.append(chr(65 + n % 26))
    #
    # print("".join(ret))
    # print("".join(test))
    print("".join(chr(65 + (ord(s) - 65 + N) % 26) for s in S))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = list(sys.stdin.readline())

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    test = []
    for s in S:
        n = ord(s) - 65 + N
        test.append(chr(65 + n % 26))

    # print("".join(ret))
    print("".join(test))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = list(sys.stdin.readline())

    ret = []
    for s in S:
        n = ord(s) + N
        ret.append(chr(((n - 65)%26)+65))

    print("".join(ret))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os


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

    N = int(sys.stdin.readline().rstrip())
    S = list(sys.stdin.readline())

    for s in S:
        n = ord(s) + N
        print(chr(((n - 65)%26)+65), end="")


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
import os

MOD = 10 ** 9 + 7


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

    N = int(sys.stdin.readline().rstrip())
    S = list(sys.stdin.readline())

    ret = []
    for s in S:
        n = ord(s) + N
        if n > 90:
            ret.append(chr(n - 26))
        else:
            ret.append(chr(n))

    print("".join(ret))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
ans =""
for c in S:
    tmp=ord(c)+N
    if(tmp>90):
        tmp=tmp-90+65
    ans+=chr(tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
#整数の入力
N = int(input())
#文字列の入力
S = input()
#listを一文字ずつのlistに
S_list = list(S)

ans = ""
for i in range(len(S_list)):
  #インクリンメント 次の文字を表示
  ans = ans + chr(ord(S_list[i]) + N)
  
  
print(ans)

Submission status: Wrong Answer

Solution code:
shift = int(input())
X = input()
ans=''
#print(X)

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']
DIC = {'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}

#print(DIC)

for i in X:
    ans += LIST[(DIC[i] + 2) % 26]
    
print (ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
cnt=len(s)
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(cnt-1):
  ans=ans+a[(i+n)%26]
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
cnt=len(s)
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(cnt):
  ans=ans+a[(i+n)%26]
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=list(input())
cha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2)
for i in range(len(S)):
    S[i]=cha[cha.index(S[i])+2]
print("".join(S))

Submission status: Wrong Answer

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

front = S[0:N]
back = S[N:]
print(back+front)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans = ""
for c in input():
  print(ord(c),ord('A'))
  ans+= chr((ord(c)-ord('A')+n)%26+ord('A'))
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans = ""
for c in input():
  ans+= chr((ord(c)+n))
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
ans=""
for s in S:
  if ord("Z") < ord(s)+N:
    ans+=chr(ord("A")+ord("Z")-(ord(s)+N))
  else:
    ans+=chr(ord(s)+N)
print(ans)

Submission status: Wrong Answer

Solution code:
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"]
N = int(input())
S = input()
for s in S:
  print(a.index(s))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
s_len=len(s)
ans=""
for i in range(s_len):
    char=97+(ord(s[i])+n-97)%26
    ans+=chr(char)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
print(S[N:len(S)]+S[-len(S):-len(S)+N])

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
ans=""
for i in s:
  q=ord(i)-65
  ans+=chr((q+n)%26)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
c = ""
for s in S:
    c = c + arr[arr.find(s)+2:arr.find(s)+3]
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
l = len(s)
ans = ""
z = ord("Z") - 1
for i in range(l):
    k = ord(s[i]) + n
    if k > z:
        k = k - z + ord("A")
    ans = ans + chr(k)

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
ans = ""
for s in S:
  ans += chr((ord(s) + N)%26 + 65)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
S = []
for i in s:
    S.append(chr((ord(i) - ord('A') + n - 26 + ord('A'))))
print(S,sep='')

Submission status: Wrong Answer

Solution code:
#import string
n = int(input())
s = input()
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
print(a)
x = ""
for i in s:
    x += a[a.index(i)+n]
print(x)

Submission status: Wrong Answer

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"]
newS=[]
for i in range(len(S)):
  for r in range(len(A)):
    if S[i]==A[r]:
      a=r+N
      if (r+N)%25==0 and (r+N)/25!=1:
        a=24
      
      elif r+N>25:
        a=(r+N)%25-1
      newS.append(A[a])
for h in range(len(newS)):
  print(*newS[h],end='')

Submission status: Wrong Answer

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"]
newS=[]
for i in range(len(S)):
  for r in range(len(A)):
    if S[i]==A[r]:
      a=r+N
      if r+N>25:
        a=(r+N)%25-1
      newS.append(A[a])
for h in range(len(newS)):
  print(*newS[h],end='')

Submission status: Wrong Answer

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

for s in S:
    ind = strs.index(s) + N
    if ind >= 26:
        ind = ind - 26
    print(strs[ind])

Submission status: Wrong Answer

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

splitedInput = list(S)
wordCount = len(splitedInput)
for i in range(wordCount):
    convertAscii = ord(splitedInput[i]) + N
    if convertAscii > ord("Z"):
        convertAscii = convertAscii - ord("Z") + ord("A") - 1
    conversion = chr(convertAscii)
    codePoint.append(conversion)

print(codePoint)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=list(input())
for i in s:
  ord_= ord("A")
  t_ord = (ord_ +n) % 26
  i = chr(t_ord)
print(''.join(s))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
print(s[n:]+s[:n])

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
n=int(input())
L=input()
F=[]
for i in range(len(L)):
    A=ord(L[i])+n
    if A>=91:
        A=A-91+65
    F.append(chr(A))
print("".join(F))

Submission status: Wrong Answer

Solution code:
num = int(input())
text = input()
movedText = ""
for i in text:
  if i == "z" or i == "Z":
    movedText += chr(ord(i) - 25 + num)
    continue
  movedText += chr(ord(i) + num)
print(movedText)

Submission status: Wrong Answer

Solution code:
num = int(input())
text = input()
movedText = ""
for i in text:
  if i == "z" or i == "Z":
    movedText += chr(ord(i) - 25)
    continue
  movedText += chr(ord(i) + num)
print(movedText)

Submission status: Wrong Answer

Solution code:
num = int(input())
text = input()
movedText = ""
for i in text:
  if i == "z":
    movedText += "a"
    continue
  movedText += chr(ord(i) + num)
print(movedText)

Submission status: Wrong Answer

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

a = ''
for i in range(lenlen):
    c = ord(s[i]) + n
    print(c)
    if 91 <= c:
        c = c - 26
    a = a + chr(c)
print(a)

Submission status: Wrong Answer

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

result=""

for i in s:
    result += chr(ord(i)+n%26)

print(result)

Submission status: Wrong Answer

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

result=""

for i in s:
    result += chr(ord(i)+n)

print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())
s = list(input())
for l in s:
  m = ((ord(l)-64)+n)%26+64
  s = chr(m)
  print(s,end="",sep="")

Submission status: Wrong Answer

Solution code:
#146 b
n=int(input())
s=input()
ans=""
for x in s:
    num=(ord(x)+n)
    if num>90:
        num=65+num%90
    ans+=chr(num)
print(ans)

Submission status: Wrong Answer

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

res =""

for ch in s:
    res += chr((ord(ch) + n) % 26)
print(res)

Submission status: Wrong Answer

Solution code:
D = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
S = list(input())

for i in range(len(S)):
    S[i] = D[(D.index(S[i]) + 1) % 26]

print("".join(S))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
res = ''
for let in s:
    newS = chr(ord(let)+n)
    res += newS
print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
for i in range(len(S)):
  moji = S[i]
  symbol = ord(moji)
  if symbol+N > 90:
    S = S.replace(moji, chr(65+N-(90-symbol)))
  else:
    S = S.replace(moji, chr(symbol+N))
print(S)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
for i in range(len(S)):
  moji = S[i]
  symbol = ord(moji)
  if symbol+N > 90:
    S = S.replace(moji, chr(60+N-(90-symbol)))
  else:
    S = S.replace(moji, chr(symbol+N))
print(S)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
for i in range(len(S)):
  moji = S[i]
  S = S.replace(moji, chr(ord(moji)+N))
print(S)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
print(len(S))
new_S = ''
alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

for s in range (len(S)):
    for i in range(26):
        if (S[s] == alphabet[i]):
            new_S += alphabet[i+N]
            break
print(new_S)

Submission status: Wrong Answer

Solution code:
a=int(input())
c=list(input())
b=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
for i in range(len(c)):
  if b.index(c[i])+2<=26:
    c[i]=b.index(c[i])+2
  else:
    c[i]=c[27-(b.index(c[i])+2)]
print(c)

Submission status: Wrong Answer

Solution code:
def rot(c):
    return chr(((ord(c) - ord('A') + 1) % 26) + ord('A'))

_ = input()
print(''.join(map(rot, input())))

Submission status: Wrong Answer

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

stack = ""
mi = ord('A')
mx = ord('Z')

for i in S :
    if ord(i)+N <= mx:
        stack = stack + chr(ord(i)+N)
    else:
        mem = ord(i)+N
        while mem >= mx:
            mem = mem-26
        stack = stack + chr(mem)

print(stack)

Submission status: Wrong Answer

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

stack = ""
mi = ord('A')
mx = ord('Z')

for i in S :
    if ord(i)+N < mx:
        stack = stack + chr(ord(i)+N)
    else:
        mem = ord(i)+N
        while mem >= mx:
            mem = mem-26
        stack = stack + chr(mem)

print(stack)

Submission status: Wrong Answer

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

stack = ""
mi = ord('A')
mx = ord('Z')

for i in S :
    if ord(i)+N < mx:
        stack = stack + chr(ord(i)+N)
    else:
        mem = ord(i)+N
        while mem >= mx:
            mem = mem-26
            print(mem)
        stack = stack + chr(mem)

print(stack)

Submission status: Wrong Answer

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

stack = ""

for i in S :
    stack = stack + chr(ord(i)+N)

print(stack)

Submission status: Wrong Answer

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

for i in range(len(S)):
    ans += chr(ord(S[i]) + N)
print(ans)

Submission status: Wrong Answer

Solution code:
def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return chr(64+num%26)
      
b = int(input())
a = input()
lista = list(a)

for i in range(len(lista)):
  tmp = alpha2num(lista[i])
  tmp += b
  lista[i] = num2alpha(tmp)
  
print(''.join(lista))

Submission status: Wrong Answer

Solution code:
def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return chr(64+num%26)
      
a = input()
lista = list(a)

for i in range(len(lista)):
  tmp = alpha2num(lista[i])
  tmp += 2
  lista[i] = num2alpha(tmp)
  
print(''.join(lista))

Submission status: Wrong Answer

Solution code:
import string
alphabet = string.ascii_uppercase

N = int(input())
chara = input()

for ch in chara:
  index = alphabet.index(ch)
  pr = (index + N) % 26
  print(pr,end = '')

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 8, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

word = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N = int(readline())
S = readline().decode('utf8').rstrip()
print(S)

ans = [None] * len(S)
print(ans)
print(len(S))
for i in range(len(S)):
    # print(word[(word.index(S[i]) + N) % len(word)])
    ans[i] = word[(word.index(S[i]) + N) % len(word)]

ans=''.join(ans)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
str = ""
for i in range(len(s)):
  str += al[(al.find(s[i])+1+1)%26]
print(str)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
str = ""
for i in range(len(s)):
  str += al[(al.find(s[i])+1)%26]
print(str)

Submission status: Wrong Answer

Solution code:
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1

n = int(input())
s = input()
str = ""
for i in range(len(s)):
  str += num2alpha((alpha2num(s[i])+n)%26)
print(str)

Submission status: Wrong Answer

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

upper = [chr(i) for i in range(65, 65+26)]
new_upper = []

for i in S:
    Index = upper.index(i) + N
    if Index >= 26:
        Index =- 26
        new_upper.append(upper[Index])
    else:
        new_upper.append(upper[Index])
        
print(''.join(new_upper))

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
out=''
for i in range(len(S)):
    out+=chr(ord(S[i])+N)
    
print(out)

Submission status: Wrong Answer

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

A = ""
num = 0
for s in S:
    num = (ord(s) + N) if ord(s) + N < 90 else (ord(s) + N - 25)
    A += chr(num)

print(A)

Submission status: Wrong Answer

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

A = ""
num = 0
for s in S:
    num = (ord(s) + N) if ord(s) + N <= 90 else (ord(s) + N - 25)
    A += chr(num)

print(A)

Submission status: Wrong Answer

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

alphabet = "ABCDEFGHIJKLMNOPQUSTUVWXYZ"

newS = S.translate(str.maketrans(alphabet, alphabet[N:]+alphabet[:N]))
print(newS)

Submission status: Wrong Answer

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

len_s = len(s)
ss = []
for i in range(len_s):
    ss += s[(i+n)%len_s]
ans = "".join(ss)
print(ans)

Submission status: Wrong Answer

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

len_s = len(s)
print(len_s)
ss = []
for i in range(len_s):
    print("i", i, "(i+n)", i+n, "(i+n)%len_s", (i+n)%len_s)
    ss += s[(i+n)%len_s]
ans = "".join(ss)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
ans = ""
for c in S:
    if ord("Z") < ord(c) + N:
        ans += chr(ord("A") + 1 + ord(c) - ord("Z"))
    else:
        ans += chr(ord(c) + N)
print(ans)

Submission status: Wrong Answer

Solution code:
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1

length = int(input())
string=input()
num_list=[(alpha2num(x)+length)%26 for x in string]
converted = "".join([num2alpha(x) for x in num_list])
print(converted)

Submission status: Wrong Answer

Solution code:
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1

length = int(input())
string=input()
num_list=[alpha2num(x)+length for x in string]
converted = "".join([num2alpha(x) for x in num_list])
print(converted)

Submission status: Wrong Answer

Solution code:
num2alpha = lambda c: chr(c+64)
alpha2num = lambda c: ord(c) - ord('A') + 1

length = int(input())
string=input()
num_list=[alpha2num(x)+2 for x in string]
converted = "".join([num2alpha(x) for x in num_list])
print(converted)