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()
a=""
for i in range(len(s)):
    a+=chr(64+(ord(s[i])-90+n)%26)
print(a)

Submission status: Wrong Answer

Solution code:
def caesar(s, n):
    ns = []
    for ch in s:
        # A - Z
        if ('A' <= ch and ch <= 'Z'):
            ns.append(chr((ord(ch) - ord('A') - n) % 26 + ord('A')))
        # a - z
        elif ('a' <= ch and ch <= 'z'):
            ns.append(chr((ord(ch) - ord('a') - n) % 26 + ord('a')))
        # 0 - 9
        elif ('0' <= ch and ch <= '9'):
            ns.append(chr((ord(ch) - ord('0') - n) % 10 + ord('0')))
        # no change for other characters
        else:
            ns.append(ch)
    return "".join(ns)

result = caesar("Hello#0", 1)
print(result)

Submission status: Wrong Answer

Solution code:
Num=int(input())
String=input()
Library=[['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',22],['W',23],['X',24],['Y',25],['Z',26]]
newstring=''
for i in String:
    for j in range(0,25):
        if i==Library[j][0]:
            oldstring=newstring
            newstring=oldstring+Library[(j+Num)%26][0]
print(newstring)

Submission status: Wrong Answer

Solution code:
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
n = int(input())
s = input()
ans =[]
for i in s:
  num = al.index(i)
  num = (num + n ) % 26 -1
  ans.append(al[num])
print(ans)

Submission status: Wrong Answer

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

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()
s_list = list(S)
ANS = ''
for i in s_list:
    if i == 'Z':
        i = '@'
    ANS += num2alpha((N + alpha2num(i)))
print(ANS)

Submission status: Wrong Answer

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

s = sorted(s)

ans = []

t = n%26

li1 = {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", 22:"W", 23:"X", 24:"Y", 25:"Z"}
li2 = {"A":0, "B":1, "C":2, "D":3, "E":4, "F":5, "G":6, "H":7, "I":8, "J":9, "K":10, "L":11, "M":12, "N":13, "O":14, "P":15, "Q":16, "R":17, "S":18, "T":19, "U":20, "V":21, "W":22, "X":23, "Y":24, "Z":25}

for i in range(len(s)):
    temp = li2[s[i]]
    temp += t
    if temp > 25:
        temp -= 26
    
    ans.append(li1[temp])

print("".join(ans))

Submission status: Wrong Answer

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

for i in range(t):
    if ord(l[i])+2<65+26:
        l[i]=chr(ord(l[i])+2)
    else:
        l[i]=chr(ord(l[i])+2-26)
ans="".join(l)
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

S_list = np.array([alpha2num(s) for s in S])

print(S_list)
S_list_added = (S_list-1+N)%26+1
print(S_list_added)

S_list_converted = [num2alpha(s) for s in S_list_added]
print("".join(S_list_converted))

Submission status: Wrong Answer

Solution code:
import sys

def increment(asc, N):
    new_int = asc + N
    if new_int > ord('Z'):
        new_int = new_int - ord('Z') + ord('A') - 1
    return new_int

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

out = ''
for c in list(S):
    asc = ord(c)
    new_c = chr(increment(asc, N))
    out += new_c

print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
alphabet_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"]
print(n)
print(s)
alphabet_indexes = []
for s_index in range(len(s)):
    for alphabet_index in range(len(alphabet_list)):
        if s[s_index] == alphabet_list[alphabet_index]:
            s_alphabet_index = (alphabet_index + n)%26
    alphabet_indexes.append(s_alphabet_index)
alphabets = []
print(alphabet_indexes)
for alphabet_index in alphabet_indexes:
    alphabets.append(alphabet_list[alphabet_index])

print("".join(map(str, alphabets)))

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
SS = [chr(i) for i in range(65,65+26)]+[chr(i) for i in range(65,65+26)]
ss = [chr(i) for i in range(97,97+26)] +[chr(i) for i in range(97,97+26)]
ans = ""
print(ord("A"))
for s in S:
    if s.islower():
        ans += ss[ord(s)-97+N]
    else:
        ans += SS[ord(s)-65+N]
print(ans)

Submission status: Wrong Answer

Solution code:
def judge(S,N):
    a = [x for x in list(S)]
    lst = ["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"]
    mak = []
    llst = lst + lst
    for i in range(len(a)):
        for j in range(26):
            if a[i]==llst[j]:
                mak.append(llst[j+N])
    print("".join(mak))

N = int(input())
S = input()
judge(S,N)

Submission status: Wrong Answer

Solution code:

def main():
    N = input()
    print(N)
    S = raw_input()
    ch = ["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 i in S:
        #print(i)
        ind = ch.index(i)+N
        ans+= ch[ind%26]

    print(ans)


if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i in range(len(s)):
  for j in range(len(a)):
    if s[i] == a[j]:
      if j+n < len(a):
      	s.replace(s[i],a[j+n])
      else:
        s.replace(s[i],a[j+n-len(a)])
print(s)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=str(input())
#print(type(l))

ll=[]
leng=len(l)
#print('leng is %d'%leng)
for i in range(leng):
    t=l[i]
    #print(t)
    tt=(ord(t)-ord('A')+1+n)%26
    ttt=chr(tt+64)
    ll.append(ttt)
print(*ll,sep='')

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ans = []
f_ans = []
for i in range(len(s)):
    if ord(s[i]) + n > 90:
        ans.append(ord(s[i]) + n - 26)
    else:
        ans.append(ord(s[i]) + n)
    f_ans.append(chr(ans[i]))
print(*f_ans)

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
    if(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:
n = int(input())
s = list(map(ord,input()))
for i in range(len(s)):
  s[i]+=n
  if s[i]>90:
    s[i]-=26
  s[i]=chr(s[i])
print(*s)

Submission status: Wrong Answer

Solution code:
n=int(input())
s=input()
num=lambda c:chr(c+64)
for i in range(1,27):
  s.replace(num(i),num(i+n))
print(s)

Submission status: Wrong Answer

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

for i in range(len(s)):
    index = a2z.index(s[i]) + n
    if index <= 25:
        tmp = a2z[index]
        ans.append(tmp)
    else:
        index -= 26
        tmp = a2z[index]
        ans.append(tmp)

for i in ans:
    print(i)

Submission status: Wrong Answer

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

Alpha = "ABCDEFGHIJKLOPQRSTUVWXYZ"
d = 0
k = ""

for i in range(len(S)):
    d = N + int(Alpha.find(S[i]))

    while(d >= len(Alpha)):
        d = d - len(Alpha)

    k = k + Alpha[d]

print(k)

Submission status: Wrong Answer

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

for s in S:
    s = ord(s)
    if (s + N) <= 90:
        s += N
    else:
        s = s + N - 26
    s = chr(s)
    print(s)

Submission status: Wrong Answer

Solution code:
Num=int(input())
String=input()
Library=[['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',22],['W',23],['X',24],['Y',25],['Z',26]]
newstring=''
for i in String:
    for j in range(0,25):
        if i==Library[j][1]:
            oldstring=newstring
            newstring=Library[(j+Num)%26][1]+oldstring
print(newstring)

Submission status: Wrong Answer

Solution code:
import string
slice_num = int(input())
string_dic = list(input())

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



print(string_dic)
for i in range(len(string_dic)):
    string_dic[i] = omoji[(omoji.index(string_dic[i])+slice_num)%26]


for i in range(len(string_dic)):
    print(string_dic[i],end="")

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
Z='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
List=[]
y=0
for i in range(len(S)):
  for j in range(len(Z)):
    if S[i]==Z[j]:
        y=Z[(j+N)%26]
    else:
        pass

  List.append(y)

print(List)

Submission status: Wrong Answer

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

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

for i in range(0,len(alp)):
    num.append(alpha2num(alp[i]))
    num[i]+=n
    num[i] = num[i]%26
    alp[i]=num2alpha(num[i])

ans = "".join(alp)
print(ans)

Submission status: Wrong Answer

Solution code:
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
n = int(input())
s = input()
ans =[]
for i in s:
  num = al.index(i)
  num = (num + n ) % 26
  ans.append(al[num])
print(ans)

Submission status: Wrong Answer

Solution code:
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"

t = int(input())
a_str = str(input())

a_uniquie = ''.join(set(a_str))

for i in a_uniquie:
  for j in range(len(a)):
    if i == a[j]:
      a_str = a_str.replace(i, a[j+t])
      break

print(a_str)

Submission status: Wrong Answer

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

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


answer = ''
for i in S:
  num = alpha(i) + N
  if num >= 27:
    num = num % 26
  answer += num2alpha(num)

print(answer)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s = list(input())

l = ['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 ss in s:
    ind = l.index(ss) + 1
    n_ind = ind + n
    r = n_ind % 26 - 1
    ans.append(l[r])

print(ans)

Submission status: Wrong Answer

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

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

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

ans = []
for i in range(len(s_list)):
    num_ = alpha2num(s_list[i])
    ans.append(num2alpha(num_ + n))

ans_str = ''

if n == 0:
    for i in range(len(s_list)):
        ans_str += s_list[i]
    print(ans_str)
else:
    for i in range(len(ans)):
        ans_str += ans[i]
    print(ans_str)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
arr = "a b c d e f g h j i k l m n o p q r s t u v w x y z".upper().split()
arr = arr[:] + arr[:] + ["A"]

sol = []
for t in s:
    for i in range(26):
        if t == arr[i]:
            sol.append(arr[i+n])
            break
        
print("".join(sol))

Submission status: Wrong Answer

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

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

alfa = alfaA + alfaB

ans = []

for i in s:
    ans.append(alfa[alfa.index(i) + 2])

print(''.join(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
s = sorted(s)
s = ''.join(s)

print(s[n:]+s[:n])

Submission status: Wrong Answer

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

char_list = list(n)
length = len(char_list)
result = []
if s != '0':
    for i in range(0,length):
        result.append(chr(ord(char_list[i]) + int(s)))
        
elif s == '0':
    result = char_list
resultstr = ''.join(result)
print(resultstr)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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"]
N = input()
S = input()
converted = map(lambda x: ALPHABETS[x.index() + N], S.split())
print(converted)

Submission status: Wrong Answer

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

s_lst=[]
for i in range(len(s)):
    o_s=ord(s[i])+n
    if o_s>=90:
        o_s=o_s-25
    s_lst.append(chr(o_s))
print(''.join(s_lst))

Submission status: Wrong Answer

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

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']
for i in range(len(S)):
    for j in range(len(alp)):
        if alp[j] == S[i]:
            ans = int((j + N) % len(alp))
            S[i] = alp[ans]
            break
        else:
            continue
print(S)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = input()
li = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"*10
dic = {}
for i in range(26):
    S = S.replace(li[26-i],li[26-i+N])
print(S)

Submission status: Wrong Answer

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

ans = ''
for c in s:
    tmp_i = ord(c) - ord('A')
    if tmp_i + n < 26:
        ans+=chr(ord(c)+n)
    else:
        ans+=chr(ord('A')+(25-tmp_i))
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
Z='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(S)):
  for j in range(len(Z)):
    if S[i]==Z[j]:
        print(Z[(j+N)%26])
    else:
        pass

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(s[n:]+s[:n])

Submission status: Wrong Answer

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

s = list(S)
alphabet = [chr(i) for i in range(65, 65 + 26)]

print(s)
print(alphabet)

dst = ''
for k in range(len(s)):
  for i in range(26):
    if alphabet[i] == s[k]:
      num = (i + N) % 26
      dst = dst + alphabet[num]
      break
print(dst)

Submission status: Wrong Answer

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

ans = []
for s in S:
    if ord(s) + N <= 90:
        print(chr(ord(s) + N))
    else:
        print(chr(ord(s) + N - 26))

Submission status: Wrong Answer

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

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

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

ans = []
for i in range(len(s_list)):
    num_ = alpha2num(s_list[i])
    ans.append(num2alpha(num_ + n))

ans_str = ''
for i in range(len(ans)):
    ans_str += ans[i]

print(ans_str)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=list(input())
A=''
for i in S:
  A+=chr(ord(i)+N)
print(A)

Submission status: Wrong Answer

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from itertools import permutations, combinations,combinations_with_replacement,product
from fractions import Fraction as frac
import bisect
import heapq

import logging
logging.basicConfig(level=logging.DEBUG)

import sys
#input = sys.stdin.readline().rstrip

setrecursionlimit(1000000)

MOD = 10**9+7
INF = float('inf')

def main():
    N=int(input())
    S=input()
    A='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    for c in S:
        i=A.index(c)
        print(A[(i+N)%26])
main()

Submission status: Wrong Answer

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

    str_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

    ans_list = []
    for i in range(len(s)):
        print(s[i])
        tmp = str_list.find(str(s[i]))
        index_tmp = tmp+n
        if index_tmp >= len(str_list):
            index_tmp -= len(str_list)

        ans_list.append(str_list[index_tmp])

    mojiretsu = ''.join(ans_list)
    print(mojiretsu)



if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

out = ""
for i in range(len(S)):
    s = (i + N) % len(S)
    out = out + S[s]

print(out)

Submission status: Wrong Answer

Solution code:
#chr(num)文字
#ord(文字)数値
#ord("A") = 65
n = int(input())
s = input()
r = 65
alphabet_number = 26
n = n % alphabet_number

lst = []

for c in s:
    lst.append(chr(ord(c)+n))

print("".join(lst))

Submission status: Wrong Answer

Solution code:
import sys

readline = sys.stdin.buffer.readline


def rot_n(c, n):
    return chr((ord(c) - ord("A") + n) % 26 + ord("A"))


def main():
    N = int(input())
    S = readline()
    S = S.decode('UTF-8')
    S = list(map(lambda c: rot_n(c, N), list(S[0:-1])))
    print("".join(S))


main()

Submission status: Wrong Answer

Solution code:
n = int(input())
s = list(input())
res = []
for si in s:
    res.append(chr(ord(si) + n))
print(''.join(res).upper())

Submission status: Wrong Answer

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

alphabet = {"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":22, "W":23, "X":24, "Y":25, "Z":26}

abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

ans = ""
for char in S:
    num = alphabet[char]
    print abc[(num+N)%26-1]

Submission status: Wrong Answer

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

dist = 25

while N > dist:
    N -= 25

for s in S:
    o = ord(s) + N
    if o > ord('Z'):
        o = ord('A') + (o - ord('Z')) - 1
    print(chr(o), end="")
print()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
key=int(input())
s=input()
for x in s:
	print(chr((ord(x)-64 + key%26)%26 + 64),end='')

Submission status: Wrong Answer

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

low = s.lower()
plain = ''

for i in list(low):
    ASCII = ord(i)
    num = ASCII - 97
    num = (num - n) % 26
    ASCII = num + 97
    plain += chr(ASCII)

print(plain.upper())

Submission status: Wrong Answer

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

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


num2alpha = lambda c: chr(c+64)

num2alpha(3) #==> C 

ans = []

for i in range(len(s)):
    #print(alpha2num(s[i])+n,(alpha2num(s[i])+n)%26)
    if alpha2num(s[i])+n == 26:
        ans.append(num2alpha((alpha2num(s[i])+n)))
        continue
    ans.append(num2alpha((alpha2num(s[i])+n)%26))
    
print(*ans,sep='')

Submission status: Wrong Answer

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


def f(c):
    r = ord(c) + n
    if 90 < r:
        r = r - (r // 90) * 26
    print(r)
    return chr(r)


r = ''

for i in s:
    r += f(i)

print(r)

Submission status: Wrong Answer

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

a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

for i in range(len(s)):
  for j in range(len(a)):
    if s[i] == a[j]:
      if j+n < len(a):
      	s[i] == a[j+n]
      else:
        s[i] == a[j+n-len(a)]
print(s)

Submission status: Wrong Answer

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	n = int(input())
	s = input()[:-1]
	ans = ''
	for i in s:
		p = ord(i) +  n
		print(p)
		ans += chr(p if p < 91 else p-26)
	print(ans)

def factorization(n):
	if n<2:
		return []

	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Submission status: Wrong Answer

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

ans = ""

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
n = len(S)
ans = ''
for i in range(n):
    a = ord(S[i])-97+N
    if a >= 26:
        a = a - 26
    a += 97
    b = chr(a)
    ans += b
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    N=I()
    A=S()
    al="ABCDEFGHIJKLMNOPQWSTUVWXYZ"

    out=""
    for a in A:
        x=al.find(a)
        x+=N
        while x>25:
            x-=26
        out+=al[x]

    print(out)




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

plain = ''

for i in list(s):
    ASCII = ord(i)
    num = ASCII - 97
    num = (num - n) % 26
    ASCII = num + 97
    plain += chr(ASCII)

print(plain)

Submission status: Wrong Answer

Solution code:
N=int(input())
S=input()
M="ABCDEFGHIJLLMNOPQRSTUVWXYZABCDEFGHIJLLMNOPQRSTUVWXYZ"


for i in range(len(S)):
    for j in range(26):
        if S[i]==M[j] :
            print(M[j+N],end="")

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s = list(input())
def rolling(str , n):
    return str[n:len(str)] + str[:n]


print("".join(rolling(s, n)))

Submission status: Wrong Answer

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

print(chr(65))
def solve():
    N = int(input())
    S = input()
    d = {chr(65+s):chr(65+(s+N)%26) for s in range(26)}
    table = str.maketrans(d)
    res = S.translate(table)
    return res
    



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

Submission status: Wrong Answer

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

S = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2

sn = ""

for i in s:
    sn += S[S.index(i)+2]

print(sn)

Submission status: Wrong Answer

Solution code:
N = int(input())
S =input()
def caesar(s, n):
    ns = []
    for ch in s:
        # A - Z
        if ('A' <= ch and ch <= 'Z'):
            ns.append(chr((ord(ch) - ord('A') - n) % 26 + ord('A')))
        else:
            ns.append(ch)
    return "".join(ns)

result = caesar(S, N)
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
S = input()
alp = 'ABCDEFGEIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
    k = alp.find(S[i])
    ans += alp[(k+N)%26]
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = input()
ss = s * 2

print(ss[n:n+len(s)])

Submission status: Accepted

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


def solve(N: int, S: str):
    answer = ""
    for s in S:
        answer += chr(65 + (ord(s) - 65 + N) % 26)
    return answer


def main():
    N = int(input())
    S = input().strip()
    answer = solve(N, S)
    print(answer)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = list(map(str,input()))
ans = [chr((ord(s[i])-ord("A")+n)%26+ord("A")) for i in range(len(s))]
print("".join(ans))

Submission status: Accepted

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

    answer = ''
    for letter in s:
        answer += chr(ord('A') + (ord(letter)-ord('A')+n) % 26)

    print(answer)


if __name__ == '__main__':
    rot_n()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = string.ascii_uppercase
ans = [l[(l.index(i) + n ) % len(l)] for i in s]
print(''.join(ans))

Submission status: Accepted

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

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

print("".join(ans))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def solve():
    N = int(input())
    S = input()
    ans = ""
    for c in S:
        v = ord(c) - ord("A")
        ans += chr(ord("A") + ((v + N) % 26))
    print(ans)


def main():
    solve()


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = list(str(input()))
a = ''
for i in s:
    b = (ord(i) + n - 65) % 26
    a += chr(b + 65)
print(a)

Submission status: Accepted

Solution code:
from string import ascii_uppercase

n = int(input())
s = input()
uu = ascii_uppercase*3

d = {}
for i in range(27):
    d[uu[i]] = uu[i+n]

ans = ""
for c in s:
    ans += d[c]

print(ans)