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=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}
 
p=0
for j in range(len(s)):
    p=0
    for i in d.keys():
        if p==(d[s[j]]+n):
            m+=i
        elif p==((d[s[j]]+n)-26):
            m+=i
 
        p+=1
 
 
for i in m:
    print(i,end="")

Submission status: Wrong Answer

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

def forward(s, n):
  A_id = ord('A')
  num_AtoZ = ord('Z') - ord('A') + 1
  return chr(A_id + (ord(s) + n) % (A_id + num_AtoZ))

print(''.join([forward(s, n) for s in S]))

Submission status: Wrong Answer

Solution code:
import sys
import string
input = sys.stdin.readline

N = int(input())
S = input().strip()
abc = [i for i in string.ascii_uppercase]
ans = ""

for letter in S:
    indx = abc.index(letter)
    nxt = indx + N
    if nxt <= 25:
        ans += abc[nxt]
    else:
        ans += abc[(indx + N - 1) % 25]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
for o in s:
    print(chr((ord(o)+n-ord('A'))%27+ord('A')),end="")
print()

Submission status: Wrong Answer

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

ret = ""
for s in list(S):
    a = ord(s)
    max_z_a = a - 25 if a + N > 90 else a
    ret += chr(max_z_a + N)
print(ret)

Submission status: Wrong Answer

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

newS = ""
for s in S.lower():
    s_to_num = ord(s) - 96
    if s_to_num + N != 26:
        new_s = chr( ( (s_to_num + N) % 26 ) + 96)
    else:
        new_s = chr( ( (s_to_num + N)) + 96)
    newS += new_s
print(newS.upper())

Submission status: Wrong Answer

Solution code:
n=int(input())
s=str(input())
s1=''
alpha='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in s:
  s1+=alpha[ord(i)-66+n]
print(s1)

Submission status: Wrong Answer

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

Solution code:
def sort(str):
  return ''.join(sorted(str))

i = int(input())
alpha = input()
x = sort(alpha[i:])
y = sort(alpha[:i])
if x.endswith("Z"):
	print(x + "A" + y)
else :
	print(x + y)

Submission status: Wrong Answer

Solution code:
def sort(str):
  return ''.join(sorted(str))

i = int(input())
alpha = input()
x = sort(alpha[i:])
y = sort(alpha[:i])
if x.endswith("Z"):
	print(x + "A" + y[1:])
else :
	print(x + y)

Submission status: Wrong Answer

Solution code:
i = int(input())
alpha = input()
x = sorted(alpha[i:])
y = sorted(alpha[:i])
print(''.join(x) + ''.join(y))

Submission status: Wrong Answer

Solution code:
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(input())
s = input()
res = s[n:] + s[:n]
print(res)

Submission status: Wrong Answer

Solution code:
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
n = int(input())
res = alphabet[n:] + alphabet[:n]
print(res)

Submission status: Wrong Answer

Solution code:
i = int(input())
alpha = input()
print(alpha[i:] + alpha[:i])

Submission status: Wrong Answer

Solution code:
n=int(input())
A=list(input())
B=""
for i in A:
  x=ord(i)
  B+=(chr(x+1))
print(str(B))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
c=""
for i in s:
  w=ord(i)+ord("A")
  if w>ord("Z"):
    w=w-ord("Z")-1+ord("A")
  c+=chr(w)
print(c)

Submission status: Wrong Answer

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*(1+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: Wrong Answer

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

Solution code:
n = int(input())
s = list(input())
for i in range(len(s)):
    for j in range(65, 91):
        if s[i] == chr(j):
            print(chr(j))
            if j + n >= 91:
                s[i] = chr(65 + n - (91 - j))
                break
            else:
                s[i] = chr(j + n)
                break
print(''.join(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)
n = int(input())
s = list(input())
ans = []

for i in s:
    num = alpha2num(i)
    num += n
    if num == 26:
        ans.append(num2alpha(num))
    else:
        num %= 26
        ans.append(num2alpha(num))

for i in ans:
    print(i, end='')

Submission status: Wrong Answer

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

for s in S:
    print(chr(ord('A') + ((ord(s) - ord('A') + N)) % 26 ))

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
for i in s:
  print(chr(ord(i)+n),end='')

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
l=[]
for i in s:
  f=ord(i)+n
  l.append(f)
for i in l:
  print(i,end='')

Submission status: Wrong Answer

Solution code:
N = int(input())
print("".join(map(lambda c: chr((c+N-65)%27+65), map(ord, input()))))

Submission status: Wrong Answer

Solution code:
alf = ([chr(i) for i in range(ord("A"), ord("Z") + 1)])
N = int(input())
s = str(input())
S = list(s)
ans = []
for i in S:
    num1 = alf.index(i)
    print(num1)
    num2 = num1 + N
    if num2<= 25:
        ans.append(alf[num2])
    else:
        ans.append(alf[num2-26])
Ans = "".join(ans)
print(Ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n=int(input())
z=input()
s=list(z)
n=n%26
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"]
x=int(len(s))
d=[]
for i in range(x):
    b=s.pop(0)
    y=a.index(b)
    if y+n>25:
        c=y+n-25
    else:
        c=y+n
    d.append(a[c])
v=int(0)
ans=''.join(d)   
print(ans)

Submission status: Wrong Answer

Solution code:
num = int(input())
str = input()

ans_ls = []
for x in str:
    i = ord(x)
    if i <= 90:
        ans_ls.append(i)
    else:
        ans_ls.append(i - 26)
ls = []
for y in ans_ls:
    l = chr(y)
    ls.append(l)

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

Submission status: Wrong Answer

Solution code:
s = input()
b= input().split()[0]
# 平文
PLAIN = str(b)

# 秘密鍵
KEY = int(s)

# 以下に、記述してください。
enc = ""

for char in list(PLAIN):
  ASCII = ord(char)
  num = ASCII - 97
  num = (num + KEY) % 26
  ASCII = num + 97
  enc += chr(ASCII)

print(enc.upper())

Submission status: Wrong Answer

Solution code:
s = input()
b= input().split()
# 平文
PLAIN = str(b)

# 秘密鍵
KEY = int(s)

# 以下に、記述してください。
enc = ""

for char in list(PLAIN):
  ASCII = ord(char)
  num = ASCII - 97
  num = (num + KEY) % 26
  ASCII = num + 97
  enc += chr(ASCII)

print(enc.upper())

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
leng=len(s)
slist=[]
#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]:
            #print(j)
            slist.append(alphabet[j+n])
            #print(alphabet[j+n])
            #print(slist[i])

print(slist)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = [''] * len(s)

for i in range(len(s)):
  if ord(s[i]) + n > ord('Z'):
    n = n - (ord('Z') - ord('A') + 1)
    
  ans[i] = chr(ord(s[i]) + n)
  
print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
b = ""
for i in range(len(s)):
  p = ord(s[i])
  if p == ord("Z"):
    p = (ord("A")-1)
  b += chr(p + n)
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())
ss = input()
s = []
for i in ss:
    s.append(i)
res = ""
n = n % 24
#print(n)
for i in s:
    #print(i)
    if ord(i)+n > 90:
        res+=chr(ord(i)-26+n)
    else:
        res += chr(ord(i)+n)
    #print(res)
        
print(res)

Submission status: Wrong Answer

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

alp = ['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']
ans = []

for c in s:
    if alp.index(c) + n > 25:
        ans.append(alp[alp.index(c)+n-26])
    else:
        ans.append(alp[alp.index(c) + n])

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ss = input()
s = []
for i in ss:
    s.append(i)
res = ""
n = n % 24
print(n)
for i in s:
    print(i)
    if ord(i)+n >= 90:
        res+=chr(ord(i)-26+n)
    else:
        res += chr(ord(i)+n)
    print(res)
        
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
 
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b = 'abcdefghijklmnopqrstuvwxyz'
 
for i in range(len(a)):
  if i+n < len(a):
    s.replace(a[i],b[i+n])
  else:
    s.replace(a[i],b[i+n-len(a)])

print(s.upper())

Submission status: Wrong Answer

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

a = input()
b = input()
f(a,b)

Submission status: Wrong Answer

Solution code:
import sys,queue,copy,math
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')
N = int(input())
S = list(input())
x = ""
ans =list()
for x in S:
    #temp = (chr(ord(x)-ord("A")+1+N))
    if ord(x)+N > ord('Z'):
        ans.append(ord('A') + (ord(x) + N - (ord('Z'))))
    else:
        ans.append(ord(x) + N)

ANS = list()
for i in range (len(S)):
    ANS.append(chr(ans[i]))

print("".join(ANS))

Submission status: Wrong Answer

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

for i in range(len(s)):
    if ord(s[i])+n > 90:
        t += chr(65+ord(s[i])+n-90)
    else:
        t += chr(ord(s[i])+n)
    
print(t)

Submission status: Wrong Answer

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)

Submission status: Wrong Answer

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


def encrypt(S, N):
    X = ""

    for ch in list(S):
        if 'A' <= ch <= 'Z':
            X += chr((ord(ch) - ord('A') - int(N)) % 26 + ord('A'))
        elif 'a' <= ch <= 'z':
            X += chr((ord(ch) - ord('a') - int(N)) % 26 + ord('a'))
        else:
            X += ch

    return X


# シーザー暗号で復号化
def decrypt(X, N):
    S = ""

    for ch in list(X):
        if 'A' <= ch <= 'Z':
            S += chr((ord(ch) - ord('A') + int(N)) % 26 + ord('A'))
        elif 'a' <= ch <= 'z':
            S += chr((ord(ch) - ord('a') + int(N)) % 26 + ord('a'))
        else:
            S += ch

    return S
    

# 暗号化
X = encrypt(S, N)
print(X)

Submission status: Wrong Answer

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%25-1
        ret_s += alpha[num]
    return print(ret_s)

Submission status: Wrong Answer

Solution code:
import math

n=int(input())
s=input()
t=''
num1=lambda c:chr(c+64)
for i in range(len(s)):
  t+=num1((ord(s[i])-64+n)%26)
print(t)

Submission status: Wrong Answer

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]:
            if i+N>=len(T):
                S_.append(T[i+N-len(T)])
            else:
                S_.append(T[i+N])
            break

strs = [str(num) for num in S_]
print(strs)

Submission status: Wrong Answer

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]:
            if i+N>=len(T):
                S_.append(T[i+N-len(T)])
            else:
                S_.append(T[i+N])
            break

print(S_)

Submission status: Wrong Answer

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

output = ""

for char in list(S):
    ASCII = ord(char)
    num = ASCII - 65
    print(num)
    print(N)
    num = (num + N) % 26
    ASCII = num + 65
    print(chr(ASCII))
    output += chr(ASCII)

print(output)

Submission status: Wrong Answer

Solution code:
alpha2num = lambda c: ord(c) - ord('A') + 1
num2alpha = lambda c: chr(c+64)
n = int(input())
s = list(input())
ans = []

for i in s:
    num = alpha2num(i)
    num += n
    if num == 26:
        ans.append(num2alpha(num))
    else:
        num %= 26
        ans.append(num2alpha(num))

for i in ans:
    print(i, end='')

Submission status: Wrong Answer

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

a = [chr(i) for i in range(65, 65+26)]
c = []
for i in range(len(s)):
    j = 0
    while s[i] != a[j]:
        j+=1
    b = (j+n)%26
    c.append(a[b])
d = c[0]
print(c)
for i in range(len(c)-1):
    d += c[i+1]
print(d)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
 
a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
b = 'abcdefghijklmnopqrstuvwxyz'
 
for i in range(len(a)):
  if i+n < len(a):
    s.replace(a[i],b[i+n])
  else:
    s.replace(a[i],b[i+n-len(a)])
for i  in range(len(a)):
  s.replace(b[i],a[i])
print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())
i_s = input()
out = ''
for s in i_s:
       s = ord(s)
       s = s + n
       if s >= 91 :
            s = s % 91 + 64
       s = chr(s)
       out += s

print(out)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
s2=""
for i in range(len(s)):
  if ord(s[i])+n>90:
    s2+chr(ord(s[i])+n-90+64)
  else:
    s2+chr(ord(s[i])+n)
print(s2)

Submission status: Wrong Answer

Solution code:
# -*- Coding: utf-8 -*-

n = int(input())
str = input()
alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
str_list=list(str)
alphabet_list=list(alphabet)
#print(str_list)
#print(alphabet_list)
#Sprint(n%26)
i=0
j=0
if n==0:
    pass
else:
 for i in range(len(str)):
    for j in range(len(alphabet)):
        #print(str_list[i])
        #print(alphabet_list[j])
        if str_list[i]==alphabet_list[j]:
            #print(i)
            #print(j)
    #        if n%26+j > 26:
    #          str_list[i]=alphabet_list[n%26+j-27]
    #          break
             #26文字を超えたときどうするかか
             #2パターン用意すればいいじゃない
    #        else:
        #        print(i)
        #        print(j)

                str_list[i]=alphabet_list[(n%26+j)%25]
                break
        else:
           pass
#print(str_list)
mojiretu=''.join(str_list)
print(mojiretu)

Submission status: Wrong Answer

Solution code:
def RotN():  
    N = int(input())
    alfabet = input()
    
    alfabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    count = []
    chara = ""
    for alfa in alfabet:
        for i, alfa2 in enumerate(alfabet2):
            if alfa2==alfa:
                c = i+N
                if c>=26:
                    c=c-26
                    chara+=alfabet2[c]
                    print(chara, c)
                else:
                    chara+=alfabet2[c]
    print(chara)
if __name__ == "__main__":
    RotN()

Submission status: Wrong Answer

Solution code:
# -*- Coding: utf-8 -*-

n = int(input())
str = input()
alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
str_list=list(str)
alphabet_list=list(alphabet)
#print(str_list)
#print(alphabet_list)
#Sprint(n%26)
i=0
j=0
if n==0:
    pass
else:
 for i in range(len(str)):
    for j in range(len(alphabet)):
        #print(str_list[i])
        #print(alphabet_list[j])
        if str_list[i]==alphabet_list[j]:
            #print(i)
            #print(j)
    #        if n%26+j > 26:
    #          str_list[i]=alphabet_list[n%26+j-27]
    #          break
             #26文字を超えたときどうするかか
             #2パターン用意すればいいじゃない
    #        else:
        #        print(i)
        #        print(j)

                str_list[i]=alphabet_list[(n%26+j)%25-1]
                break
        else:
           pass
#print(str_list)
mojiretu=''.join(str_list)
print(mojiretu)

Submission status: Wrong Answer

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

A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i,s in enumerate(S):
    n = A.index(s)
    if n+N > 25:
        nn = n+N-26
    else:
        nn = n+N
    S[i]=A[nn]
B=' '.join(S)
print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
i_s = input()
out = ''
for s in i_s:
       s = ord(s)
       s = s + n
       if s > 91 :
            s=s-26
       s = chr(s)
       out += s

print(out)

Submission status: Wrong Answer

Solution code:
n, s = input(), input()
out = ""
for i in range(len(s)):
    if ord(s[i].upper()) == 90:
        out += 'A'
    else:
        out += chr(ord(s[i].upper()) + int(n))
print(out)

Submission status: Wrong Answer

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

def shifter(n, char):
    if (char == 'Z'):
        n = n - 26
    
    return chr(ord(char) + n)

shifted_s = ''.join([shifter(n, char) for char in list(s)])

print(shifted_s)

Submission status: Wrong Answer

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


a=""

for i in s:
  a+=chr((ord(i)-65+n)%65+65)

print(a)

Submission status: Wrong Answer

Solution code:
K = int(input())
def enc(k, m):
  plain = list(m.encode("ascii")) 
  cipher = plain.copy() 
  for i,code in enumerate(plain ):
    cipher[i] = cipher[i] + k
    if (cipher[i] > 122):
      cipher[i] = cipher[i] - 26      
  return(bytes(cipher ). decode("ascii"))
angobun = enc(K,input())
print(angobun)

Submission status: Wrong Answer

Solution code:
n = int(input())
i_s = input()
out = ''
for s in i_s:
       s = ord(s)
       s = s + n
       if s > 91 :
            s=s-25
       s = chr(s)
       out += s

print(out)

Submission status: Wrong Answer

Solution code:
n, s = input(), input()
out = ""
for i in range(len(s)):
  if ord(s[i].upper()) == 90:
    out += 'A'
  else:
    out += chr(ord(s[i].upper()) + 1)
print(out)

Submission status: Wrong Answer

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

# A = 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,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 = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
print(A)
T =""
for i in S:
    print(i)
    k=A.index(i)+int(N)
    print(k)
    t=A[k]
    print(t)
    T +=t

print(T)

Submission status: Wrong Answer

Solution code:
def changeStr(num, charactor):
  sum = num + ord(charactor)
  if sum > 65 + 26 :
    return chr(sum - 26)
  else:
    return chr(sum)

inputStr = [input() for i in range(2)]
num = int(inputStr[0])
targetStr = inputStr[1]

for target in list(targetStr):
  print(changeStr(num, target))

Submission status: Wrong Answer

Solution code:
N = int(input())
str = [input() for i in range(1)]
STRING=str[0]
enc = ""

for i in list(STRING):
    ASCII = ord(i)
    num = ASCII - 65
    num = (num + N % 26)
    ASCII = num + 65
    if ASCII > 91:
        ASCII -= 26
    enc += chr(ASCII)
print(enc)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
l=s.lower()
print(l)
ans=""
for i in list(l):
  asd=ord(i)
  num=asd-97
  num=(num+n)%26
  asd=num+97
  ans+=chr(asd)
print(ans.upper())

Submission status: Wrong Answer

Solution code:
move_num = int(input())
input_char_str = input()

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

ans_char = ""
move_number = move_num
for input_char in input_char_str:
    if (char_list.index(input_char)+move_number) < len(char_list):
        ans_char += char_list[char_list.index(input_char)+move_number]
    else:
        char_index = (char_list.index(input_char)+move_number) - len(char_list)
        ans_char += char_list[char_index]

Submission status: Wrong Answer

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

for i in range (0, len(S)):
    if ord(S[i]) + N <= 90:
        character.append(chr(ord(S[i]) + N))
    else :
        character.append(chr(ord(S[i]) + N - 89 +63))


print(character)

Submission status: Wrong Answer

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

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

def shift(l, n):
    return l[n:] + l[:n]

print(shift(S,N))

Submission status: Wrong Answer

Solution code:
n = int(input())
i_s = input()
out = ''
for s in i_s:
        s = ord(s)
        s = s + n
        s = chr(s)
        out += s

print(out)

Submission status: Wrong Answer

Solution code:
N = int(input())
str = [input() for i in range(1)]
STRING=str[0]
enc = ""

for i in list(STRING):
    ASCII = ord(i)
    num = ASCII - 65
    num = (num + N % 26)
    ASCII = num + 65
    enc += chr(ASCII)
print(enc)

Submission status: Wrong Answer

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

# A = 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,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 = list('ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ')
print(A)
T=[]
for i in S:
    print(i)
    k=A.index(i)+int(N)
    print(k)
    t=A[k]
    T.append(t)

print(T)

Submission status: Wrong Answer

Solution code:
move_num = int(input())
input_char_str = input()

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

ans_char = ""
move_number = 0
for input_char in input_char_str:
    if (char_list.index(input_char)+move_number) < len(char_list):
        ans_char += char_list[char_list.index(input_char)+move_number]
    else:
        char_index = (char_list.index(input_char)+move_number) % len(char_list)
        ans_char += char_list[char_index]

Submission status: Wrong Answer

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

if N == 0:
  print(S)
else:
  print(S[N+1:] + S[:N+1])

Submission status: Wrong Answer

Solution code:
def RotN():  
    N = int(input())
    alfabet = input()
    
    alfabet2 = "ABCDEFGHIJKLNMOPQRSTUVWXYZ"

    count = []
    for alfa in alfabet:
        for i, alfa2 in enumerate("ABCDEFGHIJKLNMOPQRSTUVWXYZ"):
            if alfa2==alfa:
                count.append(i+N)
    chara = ""
    for c in count:
        if c>=26:
            c=c-26
            chara+=alfabet2[c]
        else:
            chara+=alfabet2[c]
    print(chara)
if __name__ == "__main__":
    RotN()

Submission status: Wrong Answer

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

abc = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") 
ans = []

for i in range(len(S)):
    index = abc.index(S[i])
    if index + N < 26:
        ans.append(abc[index + N])
    else:
        ans.append(abc[index + N - 26])
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ns = []
for ch in s:
    if ('A' <= ch and ch <= 'Z'):
        ns.append(chr((ord(ch) - ord('A') - n) % 26 + ord('A')))
       
   
print("".join(ns))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
S = [i for i in s]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i, value1 in enumerate(S):
    for j, value2 in enumerate(a):
        if value1 == value2:
            if j+2 >= len(a):
                S[i] = a[j+2-len(a)]
                break
            else:
                S[i] = a[j+2]
                break    
S = "".join(S)
print(S)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
a = ''
for i in s:
  n = (ord(i) + n) // 90 + 65
  a += chr(n)
print(a)

Submission status: Wrong Answer

Solution code:
s = input()
a = ''
for i in s:
  n = (ord(i) + 2) // 90 + 65
  a += chr(n)
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
temp = 0
ans = ""
for i in input():
    temp = ord(i)
    if temp + N >= 65 + 26:
        temp = temp - 26
        print(temp)
print(ans)

Submission status: Wrong Answer

Solution code:
n=input()

s=input()
s=s.lower()

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"]
length=len(s)
print(length)
export=""
for i in range(length):
    num=list.index(s[i])
    num=(num+int(n))%26
    export+=list[num]
    
export=export.upper()
print(export)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
t=''
num1=lambda c:chr(c+64)
for i in range(len(s)):
  t+=num1(ord(s[i])-64+n)
print(t)

Submission status: Wrong Answer

Solution code:
N=int(input())
str=input()
ordnum=0
ans=""
for i in str:
  ordnum=ord(i)+N
  if (ordnum>91):
    ordnum=ordnum-26
  ans=ans+chr(ordnum)
print(ans)

Submission status: Wrong Answer

Solution code:
AL = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

N = 3

S = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
A = []

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

Submission status: Wrong Answer

Solution code:
N = int(input())
temp = 0
ans = ""
for i in input():
    temp = ord(i)
    if temp + N > 97 + 26:
        temp = temp - 26
    ans += chr(temp+N)
print(ans)

Submission status: Wrong Answer

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

def getChar(char, num):
    if num > 25:
        num %= 25

    if num + ord(char) > 90:
        num -= 26

    return chr(ord(char) + num)

result =""
for i in s:
    result += getChar(i, n)

print(result)

Submission status: Wrong Answer

Solution code:
a=int(input())
alp=input()
x=""
for i in range(len(alp)):
    f=(a+ord(alp[i])-64)%26+64
    x+=chr(f)
print(x)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = str(input())
def rot(s, num):
    ans = []
    for i in range(len(s)):
        temp = ord(s[i])
        if 65 <= temp + num < 90:
            ans.append(chr(temp + num))
        else:
            ans.append(chr(65 + (temp + num) - 91))
    temp_ans = "".join(ans)
    return temp_ans
print(rot(s = S, num = N))

Submission status: Wrong Answer

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}

p=0
for j in range(len(s)):
    p=0
    for i in d.keys():
        if p==(d[s[j]]+n):
            m+=i
        elif p==((d[s[j]]+n)-26):
            m+=i

        p+=1


for i in m:
    print(i,end="")

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def get_str_leading_n(string, alphabets, N):
    index_ = (alphabets.index(string.upper()) + N) // 26
    return alphabets[index_]
output = "".join(list(map(lambda p: get_str_leading_n(p, alphabets, N), S)))
print(output)

Submission status: Wrong Answer

Solution code:
N = int(input('int'))
S = input('string')
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']
new_string = ''

for s in S:
    new_string += (alphabets[(alphabets.index(s) + N) % 26])


print(new_string)

Submission status: Wrong Answer

Solution code:
N = int(input())
temp = 0
ans = ""
for i in input():
    temp = ord(i)
    if temp + N > 97 + 26:
        temp = temp + N - 26
    ans += chr(temp)
print(ans)

Submission status: Wrong Answer

Solution code:
kotae=[]
N = int(input())
Sst=input()
S = list(Sst)
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','Q','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','Q','V','W','X','Y','Z','A','B','C']

for i in range(len(Sst)):
    for j in range(26):
        if S[i] == L[j]:
            kotae.append(L[j+N])

Sed = "".join(kotae)
print(Sed)

Submission status: Wrong Answer

Solution code:
N=int(input())
SS=input()
a=list(SS)
alpha=["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"]
SS2=[]
for i in range(len(a)):
    x=alpha.index(a[i])
    SS2.append(x)

for j in range(len(SS2)):
    SS2[j]+=1

SS3=[]
for k in range(len(SS2)):
    y=alpha[SS2[k]]
    SS3.append(y)

moji="".join(SS3)
print(moji)

Submission status: Wrong Answer

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

n_s = ""

for c in s:
    add = n
    c_num = ord(c) - 64
    print(c_num)
    if(c_num == 26):
        n_s += chr(64 + 26)
    elif(c_num + n > 26):
        add = (c_num + n) % 26
        n_s += chr(add + 64)
    else:
        n_s += chr(c_num + add + 64)

print(n_s)

Submission status: Wrong Answer

Solution code:
a=int(input())
alp=input()
x=""
for i in range(len(alp)):
    f=(a+ord(alp[i])-96)%26+96
    x+=chr(f)
print(x)

Submission status: Wrong Answer

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


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

ans = []
for character in S:
  try:
    num = alpha2num(character)
    new_num = (num + N) % 26
    new_chr = num2alpha(new_num)
    ans.append(new_chr)
  except:
    break

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

Submission status: Wrong Answer

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