problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02848 | 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)) | # B - ROT N
D = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
S = list(input())
for i in range(len(S)):
S[i] = D[(D.index(S[i]) + n) % 26]
print("".join(S))
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,739 | 654,740 | u949876708 | python |
p02848 | 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) | 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) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.condition.change"
] | 654,751 | 654,750 | u716660050 | python |
p02848 | 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) | 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) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.condition.change",
"call.remove"
] | 654,752 | 654,750 | u716660050 | python |
p02848 | 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 = '')
| import string
alphabet = string.ascii_uppercase
N = int(input())
chara = input()
for ch in chara:
index = alphabet.index(ch)
pr = alphabet[(index + N) % 26]
print(pr,end = '') | [] | 654,765 | 654,766 | u692054751 | python |
p02848 | 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) | n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
str = ""
for i in range(len(s)):
str += al[(al.find(s[i])+n)%26]
print(str) | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 654,767 | 654,768 | u414458988 | python |
p02848 | n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
str = ""
for i in range(len(s)):
str += al[(al.find(s[i])+1)%26]
print(str)
| n = int(input())
s = input()
al = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
str = ""
for i in range(len(s)):
str += al[(al.find(s[i])+n)%26]
print(str) | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,769 | 654,768 | u414458988 | python |
p02848 | 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)) | 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)) | [
"assignment.value.change",
"expression.operation.unary.arithmetic.remove"
] | 654,772 | 654,773 | u877428733 | python |
p02848 | al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())
for i in range(len(S)):
x = al.index(S[i])
c = x+N
if c <= 25:
S[i] = al[c]
else:
S[i] = al[c-25]
print("".join(S)) | al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())
for i in range(len(S)):
x = al.index(S[i])
c = x+N
if c <= 25:
S[i] = al[c]
else:
S[i] = al[c-26]
print("".join(S)) | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,774 | 654,775 | u699089116 | python |
p02848 | al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())
for i in range(len(S)):
x = al.index(S[i])
c = x+N
if c < 25:
S[i] = al[c]
else:
S[i] = al[c-25]
print("".join(S)) | al = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ')
N = int(input())
S = list(input())
for i in range(len(S)):
x = al.index(S[i])
c = x+N
if c <= 25:
S[i] = al[c]
else:
S[i] = al[c-26]
print("".join(S)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,776 | 654,775 | u699089116 | python |
p02848 | 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() | n=int(input())
s=str(input())
for i in range(len(s)):
tmp=ord(s[i])
tmp+=n
if tmp>90:
tmp=(tmp%90)+64
print(chr(tmp),end="")
print() | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.number.integer.change"
] | 654,780 | 654,781 | u758831502 | python |
p02848 | n = int(input())
s = str(input())
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
rot = []
for i in s:
pos = alphabet.find(i)
pos = int(pos) + n
if pos > 26:
pos = int(pos) - 26
rot.append(alphabet[pos])
strout = "".join(rot)
print(strout) | n = int(input())
s = str(input())
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
rot = []
for i in s:
pos = alphabet.find(i)
pos = int(pos) + n
if pos >= 26:
pos = int(pos) - 26
rot.append(alphabet[pos])
strout = "".join(rot)
print(strout) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 654,782 | 654,783 | u366185462 | python |
p02848 | a=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
b=int(input())
s=input()
for i in s:
b=a.index(i)+N
if b<=25:
print(a[b],end="")
else:
print(a[b-26],end="") | a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
N = int(input())
S = input()
for i in S:
b = a.index(i) + N
if b <= 25:
print(a[b], end="")
else:
print(a[b-26], end="") | [
"assignment.variable.change",
"identifier.change"
] | 654,789 | 654,790 | u444722572 | python |
p02848 | N=int(input())
S=input()
abc_list="abcdefghijklmnopqrstuvwxyz"
L=len(abc_list)
ans= " "
for i in S:
ans += abc_list[(abc_list.index(i)+N) % L]
print(ans) | N=int(input())
S=input()
abc_list="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
L=len(abc_list)
ans= " "
for i in S:
ans += abc_list[(abc_list.index(i)+N) % L]
print(ans) | [
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 654,797 | 654,798 | u216752093 | python |
p02848 | alpha = 'ABCDEFGHIJKLMNOPQRSTUvWXYZ'
n = int(input())
s = input()
ans = ''
for x in s:
ans += alpha[(alpha.find(x) + n) % 26]
print(ans) | alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
n = int(input())
s = input()
ans = ''
for x in s:
ans += alpha[(alpha.find(x) + n) % 26]
print(ans) | [
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 654,799 | 654,800 | u866769581 | python |
p02848 | ls = ["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":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}
n = int(input())
s = input()
ans = ""
for i in range(len(s)):
ans += ls[dic[s[i]]+n-1]
print(ans) | ls = ["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":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}
n = int(input())
s = input()
ans = ""
for i in range(len(s)):
ans += ls[(dic[s[i]]+n-1) % 26]
print(ans)
| [
"expression.operation.binary.add"
] | 654,803 | 654,804 | u333139319 | python |
p02848 | 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)) | 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) + n) % 26
ans.append(alp[i])
print(''.join(ans)) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 654,810 | 654,811 | u157020659 | python |
p02848 | 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) | 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 -26
ans += chr(chr_a)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 654,816 | 654,817 | u224554402 | python |
p02848 | 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))
| N = int(input())
S = list(input())
ans = []
for i in S:
s = int(ord(i)) + N
if s > 90:
ans.append(chr(s % 91 + 65))
else:
ans.append(chr(s % 65 + 65))
print(''.join(ans))
| [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 654,818 | 654,819 | u526094365 | python |
p02848 | 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)
| n = int(input())
ls = list(map(str,input()))
r = len(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)
| [
"call.remove"
] | 654,822 | 654,823 | u247830763 | python |
p02848 | N=int(input())
S=input()
ANS=""
for i in range(len(S)):
ANS+=chr(64+((ord(S[i])+N)-64)%26)
print(ANS) | N=int(input())
S=input()
ANS=""
for i in range(len(S)):
ANS+=chr(65+((ord(S[i])+N)-65)%26)
print(ANS) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 654,834 | 654,835 | u419963262 | python |
p02848 | 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)) | n = int(input())
s = input()
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)) | [
"assignment.remove"
] | 654,836 | 654,837 | u346395915 | python |
p02848 | n = int(input())
s = input()
alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","M","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
ans = ""
for i in range(len(s)):
num = (alphabet.index(s[i]) + n) % len(alphabet)
ans += alphabet[num]
print(ans) | n = int(input())
s = input()
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"]
ans = ""
for i in range(len(s)):
num = (alphabet.index(s[i]) + n) % len(alphabet)
ans += alphabet[num]
print(ans) | [
"literal.string.change",
"assignment.value.change"
] | 654,838 | 654,839 | u573234244 | python |
p02848 | n = int(input())
s = input()
alphabet = ["A","B","C","D","E","F","G","H","I","J","K","L","M","M","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
ans = ""
for i in range(len(s)):
num = ( alphabet.index(s[i]) + n ) % len(alphabet)
ans += alphabet[num]
print(ans) | n = int(input())
s = input()
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"]
ans = ""
for i in range(len(s)):
num = (alphabet.index(s[i]) + n) % len(alphabet)
ans += alphabet[num]
print(ans) | [
"literal.string.change",
"assignment.value.change"
] | 654,840 | 654,839 | u573234244 | python |
p02848 | 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) | 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(ans) | [
"call.remove"
] | 654,844 | 654,845 | u106181248 | python |
p02848 | 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) | 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-26)
else:
new+=chr(b)
print(new) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 654,858 | 654,859 | u460386402 | python |
p02848 | 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)) | 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 = 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-26])
else:
B.append(A[j+N])
print(''.join(B)) | [
"literal.string.change",
"assignment.value.change",
"literal.number.integer.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 654,862 | 654,863 | u514118270 | python |
p02848 | 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()
| 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().rstrip()
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()
| [
"call.add"
] | 654,879 | 654,880 | u634079249 | python |
p02848 | 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) | N = int(input())
S = str(input())
ans =""
for c in S:
tmp=ord(c)+N
if(tmp>90):
tmp=tmp-90+64
ans+=chr(tmp)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 654,881 | 654,882 | u765758367 | python |
p02848 | 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) | 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] + shift) % 26]
print (ans) | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,892 | 654,893 | u401341173 | python |
p02848 | 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)) | N=int(input())
S=list(input())
cha = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2)
for i in range(len(S)):
S[i]=cha[cha.index(S[i])+N]
print("".join(S)) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,896 | 654,897 | u998262711 | python |
p02848 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from EmurateInput import input
N, S = int(input()), input()
def rot_encode(n):
from string import ascii_lowercase as lc, ascii_uppercase as uc
lookup = str.maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n])
return lambda s: s.translate(lookup)
print(rot_encode(N)(S))
| N, S = int(input()), input()
def rot_encode(n):
from string import ascii_lowercase as lc, ascii_uppercase as uc
lookup = str.maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n])
return lambda s: s.translate(lookup)
print(rot_encode(N)(S))
| [] | 654,900 | 654,901 | u643817184 | python |
p02848 | n = int(input())
s = input()
t=str()
for i in s:
x = chr(ord(i) + n)
if ord(t) > ord('Z'):
x = chr(ord(x) - ord('Z') + ord('A')-1)
ss += x
print(t)
| n = int(input())
s = input()
ss=str()
for i in s:
t = chr(ord(i) + n)
if ord(t) > ord('Z'):
t = chr(ord(t) - ord('Z') + ord('A')-1)
ss += t
print(ss)
| [
"assignment.variable.change",
"identifier.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 654,904 | 654,905 | u274635633 | python |
p02848 | 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) | n=int(input())
s=input()
s_len=len(s)
ans=""
for i in range(s_len):
char=65+(ord(s[i])+n-65)%26
ans+=chr(char)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 654,914 | 654,915 | u217627525 | python |
p02848 | n=int(input())
s=input()
s_len=len(s)
ans=""
for i in range(s_len):
char=97+(ord(s)+n)%26
ans+=chr(char)
print(ans) | n=int(input())
s=input()
s_len=len(s)
ans=""
for i in range(s_len):
char=65+(ord(s[i])+n-65)%26
ans+=chr(char)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 654,916 | 654,915 | u217627525 | python |
p02848 | n=int(input())
s=list(input())
ans=""
for i in s:
q=ord(i)-65
ans+=chr((q+n)%26)
print(ans) | n=int(input())
s=list(input())
ans=""
for i in s:
q=ord(i)-65
ans+=chr((q+n)%26+65)
print(ans)
| [
"expression.operation.binary.add"
] | 654,919 | 654,920 | u023229441 | python |
p02848 | 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) | N = int(input())
S = input()
arr = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
c = ""
for s in S:
c = c + arr[arr.find(s)+N:arr.find(s)+N+1]
print(c) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,921 | 654,922 | u536560967 | python |
p02848 | n= int(input())
s = input()
al='ABCDEFGHIJKLMNOPQRSTUVXXYZ'
print(''.join([al[-len(al)+al.index(i)+n] for i in s])) | n= int(input())
s = input()
al='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
print(''.join([al[-len(al)+al.index(i)+n] for i in s])) | [
"literal.string.change",
"assignment.value.change"
] | 654,925 | 654,926 | u035445296 | python |
p02848 | 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) | n = int(input())
s = input()
l = len(s)
ans = ""
z = ord("Z")
for i in range(l):
k = ord(s[i]) + n
if k > z:
k = k - z + (ord("A") - 1)
ans = ans + chr(k)
print(ans) | [
"expression.operation.binary.remove"
] | 654,927 | 654,928 | u977193988 | python |
p02848 | N = int(input())
S = input()
ans = ""
for s in S:
ans += chr((ord(s) + N)%26 + 65)
print(ans) | N = int(input())
S = input()
ans = ""
for s in S:
ans += chr((ord(s) + N-65)%26 + 65)
print(ans) | [
"expression.operation.binary.add"
] | 654,929 | 654,930 | u985963315 | python |
p02848 | N = int(input())
S = input()
ans = ""
for s in S:
ans += chr((ord(S) + N - 65)%26 + 65)
print(ans) | N = int(input())
S = input()
ans = ""
for s in S:
ans += chr((ord(s) + N-65)%26 + 65)
print(ans) | [
"misc.typo",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 654,931 | 654,930 | u985963315 | python |
p02848 | N = int(input())
st = input()
ans_st = ""
for i in range(N):
ch_ord = ord(st[i])
if ch_ord + N > 122:
ans_st += chr(ch_ord + N - 26)
else:
ans_st += chr(ch_ord + N)
print(ans_st) | N = int(input())
st = input()
ans_st = ""
for i in range(len(st)):
ch_ord = ord(st[i])
if ch_ord + N > 90:
ans_st += chr(ch_ord + N - 26)
else:
ans_st += chr(ch_ord + N)
print(ans_st) | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add",
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 654,932 | 654,933 | u667084803 | python |
p02848 | n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVXYZ"
print(''.join([d[(d.index(i) + n) % 26] for i in s])) | n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print(''.join([d[(d.index(i) + n) % 26] for i in s])) | [
"literal.string.change",
"assignment.value.change"
] | 654,934 | 654,935 | u700805562 | python |
p02848 | n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVXYZ"
print("".join([d[(d.index(i)+n)%26] for i in s])) | n = int(input())
s = input()
d = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
print(''.join([d[(d.index(i) + n) % 26] for i in s])) | [
"literal.string.change",
"assignment.value.change",
"call.arguments.change",
"io.output.change"
] | 654,936 | 654,935 | u700805562 | python |
p02848 | n = int(input())
s = input()
S = []
for i in s:
S.append(chr((ord(i) - ord('A') + n - 26 + ord('A'))))
print(S,sep='') | n = int(input())
s = input()
S = []
for i in s:
S.append(chr(((ord(i) - ord('A') + n) % 26 + ord('A'))))
print(*S,sep='') | [
"call.arguments.change",
"expression.operation.binary.change"
] | 654,939 | 654,940 | u411255472 | python |
p02848 | N = int(input())
S = input()
ans=''
for x in S:
nc=ord(N[x])
nc+=N
if nc>90:
nc-=26
ans+=chr(nc)
print(ans) | N = int(input())
S = input()
ans=""
for x in S:
nc=ord(x)
nc+=N
if nc>90:
nc-=26
ans+=chr(nc)
print(ans) | [
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 654,946 | 654,947 | u735175408 | python |
p02848 | n=int(input())
s=input()
ans=[]
for i in range(len(s)):
num=ord(s[i])+n
if num>90:
num-=25
ans.append(chr(num))
ans="".join(ans)
print(ans) | n=int(input())
s=input()
ans=[]
for i in range(len(s)):
num=ord(s[i])+n
if num>90:
num-=26
ans.append(chr(num))
ans="".join(ans)
print(ans) | [
"literal.number.integer.change"
] | 654,963 | 654,964 | u954153335 | python |
p02848 | n=int(input())
s=input()
ans=[]
for i in range(n):
num=ord(s[i])+2
if num>90:
num-=90
ans.append(chr(num))
ans="".join(ans)
print(ans) | n=int(input())
s=input()
ans=[]
for i in range(len(s)):
num=ord(s[i])+n
if num>90:
num-=26
ans.append(chr(num))
ans="".join(ans)
print(ans) | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add",
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change",
"literal.number.integer.change"
] | 654,965 | 654,964 | u954153335 | python |
p02848 | N=int(input())
S=input()
s=list()
for i in S:
temp=ord(i)+2
if temp<=ord("Z"):
s.append(chr(temp))
else:
s.append(chr(temp-(ord("Z")-ord("A"))-1))
for i in s:
print(i,end="")
| N=int(input())
S=input()
s=list()
for i in S:
temp=ord(i)+N
if temp<=ord("Z"):
s.append(chr(temp))
else:
s.append(chr(temp-(ord("Z")-ord("A"))-1))
for i in s:
print(i,end="")
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 654,966 | 654,967 | u500376440 | python |
p02848 | num = int(input())
node = input()
table = list(node)
for i in table:
aaa = ord('A') + ((ord(i) - (ord('A')) + num) % 26)
print(chr(aaa))
| num = int(input())
node = input()
table = list(node)
for i in table:
aaa = ord('A') + ((ord(i) - (ord('A')) + num) % 26)
print(chr(aaa), end='')
| [
"call.arguments.add"
] | 654,970 | 654,971 | u073606136 | python |
p02848 | N = int(input())
S = input()
ans = ''
Z_s = 'Z'
for i in range(len(S)):
ord_s = ord(S[i]) + N
if ord_s > ord(Z_s):
ord_s -= ord('Z') - ord('A')
ans += chr(ord_s)
print(ans) | N = int(input())
S = input()
ans = ''
Z_s = 'Z'
for i in range(len(S)):
ord_s = ord(S[i]) + N
if ord_s > ord(Z_s):
ord_s -= ord('Z') - ord('A') + 1
ans += chr(ord_s)
print(ans) | [
"expression.operation.binary.add"
] | 654,978 | 654,979 | u355853184 | python |
p02848 | import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 1
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()
n = k()
S = list(v())
for i in range(len(S)):
a = AL.index(S[i])
ans = a+2
if ans >= 26:
ans = (a+2)-26
S[i] = AL[ans]
print("".join(S)) | import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 1
inf = float("inf")
al = "abcdefghijklmnopqrstuvwxyz"
AL = al.upper()
n = k()
S = list(v())
for i in range(len(S)):
a = AL.index(S[i])
ans = a+n
if ans >= 26:
ans = (a+n)-26
S[i] = AL[ans]
print("".join(S)) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 654,989 | 654,990 | u750651325 | python |
p02848 | n = int(input())
s = input()
t = ""
for i in s:
a = ord(i) + n
if a > ord("Z"):
a = a - 26
t += chr(a) | n = int(input())
s = input()
t = ""
for i in s:
a = ord(i) + n
if a > ord("Z"):
a = a - 26
t += chr(a)
print(t) | [
"call.add"
] | 654,995 | 654,996 | u468972478 | python |
p02848 | N=int(input())
S=list(map(str, input()))
li=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','W','X','Y','Z']
answer=[]
for i in range(len(S)):
for j in range(len(li)):
if S[i]==li[j] and j<len(li)-N:
answer.append(li[j+N])
elif S[i]==li[j] and j>=len(li)-N:
answer.append(li[j+N-len(li)])
print("".join(answer)) | N=int(input())
S=list(map(str, input()))
li=['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']
answer=[]
for i in range(len(S)):
for j in range(len(li)):
if S[i]==li[j] and j<len(li)-N:
answer.append(li[j+N])
elif S[i]==li[j] and j>=len(li)-N:
answer.append(li[j+N-len(li)])
print("".join(answer)) | [] | 654,997 | 654,998 | u005977014 | python |
p02848 | n = int(input())
S = input()
tmp = []
for s in S:
if ord(s)+n > ord('Z'):
tmp.append(ord('A')+(ord(s)+n)%ord('Z'))
else:
tmp.append(ord(s)+n)
ans = ''
for i in tmp:
ans += chr(i)
print(ans) | n = int(input())
S = input()
tmp = []
for s in S:
if ord(s)+n > ord('Z'):
tmp.append(ord('A')+(ord(s)+n)%ord('Z')-1)
else:
tmp.append(ord(s)+n)
ans = ''
for i in tmp:
ans += chr(i)
print(ans) | [
"expression.operation.binary.add"
] | 655,009 | 655,010 | u363421241 | python |
p02848 | n=int(input())
s=input()
l=[]
for a in s:
moji=ord(a)
moji+=n
print(moji)
if int(moji)>90:
moji-=26
l.append(chr(moji))
print(''.join(l)) | n=int(input())
s=input()
l=[]
for a in s:
moji=ord(a)
moji+=n
if int(moji)>90:
moji-=26
l.append(chr(moji))
print(''.join(l)) | [
"call.remove"
] | 655,011 | 655,012 | u087118202 | python |
p02848 | N = int(input())
S = list(input())
ans = []
print(S)
for s in S:
ord_plus = ord(s)+N
if ord_plus > 90:
ord_plus -= 26
ans.append(chr(ord_plus))
print("".join(ans)) | N = int(input())
S = list(input())
ans = []
for s in S:
ord_plus = ord(s)+N
if ord_plus > 90:
ord_plus -= 26
ans.append(chr(ord_plus))
print("".join(ans)) | [
"call.remove"
] | 655,019 | 655,020 | u760961723 | python |
p02848 | n = int(input())
s = input()
x = []
import string
a = list(string.ascii_uppercase)
for i in s:
b = a.index(i)
x.append(a[b + n])
print(''.join(x)) | n = int(input())
s = input()
x = []
import string
a = list(string.ascii_uppercase)*2
#print(a)
for i in s:
b = a.index(i)
x.append(a[b + n])
print(''.join(x))
| [
"assignment.change"
] | 655,021 | 655,022 | u680851063 | python |
p02848 | 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) | N = input()
S = input()
N = int(N)
A = ""
num = 0
for s in S:
num = (ord(s) + N) if ord(s) + N < 91 else (ord(s) + N - 26)
A += chr(num)
print(A) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,027 | 655,028 | u510434738 | python |
p02848 | 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) | N = input()
S = input()
N = int(N)
A = ""
num = 0
for s in S:
num = (ord(s) + N) if ord(s) + N < 91 else (ord(s) + N - 26)
A += chr(num)
print(A) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,029 | 655,028 | u510434738 | python |
p02848 | n = int(input())
s = input()
list = []
for i in s:
if ord(i)+N > 90:
list.append(chr(ord(i)+N-26))
else:
list.append(chr(ord(i)+N))
ans = "".join(list)
print(ans) | n = int(input())
s = input()
list = []
for i in s:
if ord(i)+n > 90:
list.append(chr(ord(i)+n-26))
else:
list.append(chr(ord(i)+n))
ans = "".join(list)
print(ans) | [
"identifier.change",
"control_flow.branch.if.condition.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,039 | 655,040 | u825842302 | python |
p02848 | N = int(input())
S = input()
alphabet = "ABCDEFGHIJKLMNOPQUSTUVWXYZ"
newS = S.translate(str.maketrans(alphabet, alphabet[N:]+alphabet[:N]))
print(newS) | N = int(input())
S = input()
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
newS = S.translate(str.maketrans(alphabet, alphabet[N:]+alphabet[:N]))
print(newS) | [
"literal.string.change",
"assignment.value.change"
] | 655,045 | 655,046 | u450983668 | python |
p02848 | N = int(input())
S = list(input())
lst = [chr(ord('a') + i) for i in range(26)]
lst_up = list(map(str.upper,lst))
for i in range(len(S)):
if int(lst_up.index(S[i])+N) <= len(lst_up):
S[i] = lst_up[lst_up.index(S[i])+N]
elif int(lst_up.index(S[i])+N) > len(lst_up):
S[i] = lst_up[lst_up.index(S[i])+N-26]
lst_2 = "".join(S)
print(lst_2) | N = int(input())
S = list(input())
lst = [chr(ord('a') + i) for i in range(26)]
lst_up = list(map(str.upper,lst))
for i in range(len(S)):
if int(lst_up.index(S[i])+N+1) <= len(lst_up):
S[i] = lst_up[lst_up.index(S[i])+N]
elif int(lst_up.index(S[i])+N+1) > len(lst_up):
S[i] = lst_up[lst_up.index(S[i])+N-26]
lst_2 = "".join(S)
print(lst_2) | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 655,056 | 655,057 | u972658925 | python |
p02848 |
n = int(input())
s = input()
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUWVXYZabcdefghijklmnopqrstuwvxyz"
a_list=[]
for j in a:
a_list.append(j)
for i in range (len(s)):
ans.append(a_list[a_list.index(s[i])+n].upper())
print("".join(ans))
|
n = int(input())
s = input()
ans=[]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
a_list=[]
for j in a:
a_list.append(j)
for i in range (len(s)):
ans.append(a_list[a_list.index(s[i])+n].upper())
print("".join(ans))
| [
"literal.string.change",
"assignment.value.change"
] | 655,058 | 655,059 | u027675217 | python |
p02848 | KEY = int(input())
s = input()
ans = ""
for i in range(len(s)):
num = ord(s[i])
num = num + (KEY % 26)
if ord("Z") < num:
num = ord("A") + num - ord("Z")
ans += chr(num)
print(ans) | KEY = int(input())
s = input()
ans = ""
for i in range(len(s)):
num = ord(s[i])
num = num + (KEY % 26)
if ord("Z") < num:
num = ord("A") + num - ord("Z") - 1
ans += chr(num)
print(ans) | [
"assignment.change"
] | 655,062 | 655,063 | u652057333 | python |
p02848 | N = int(input())
S = 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']
A = []
for c in S:
i = L.find(c)
A.append(L[(i + n)%26])
print(''.join(A)) | N = int(input())
S = 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']
A = []
for c in S:
i = L.index(c)
A.append(L[(i + N)%26])
print(''.join(A))
| [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,066 | 655,067 | u963468276 | python |
p02848 | N = int(input())
S = input()
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 = []
for c in S:
i = Alphabet.find(c)
A.append(Alphabet[(i + n)%26])
print(''.join(A)) | N = int(input())
S = 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']
A = []
for c in S:
i = L.index(c)
A.append(L[(i + N)%26])
print(''.join(A))
| [
"assignment.variable.change",
"identifier.change",
"assignment.value.change",
"call.arguments.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,068 | 655,067 | u963468276 | python |
p02848 | N = int(input())
S = input()
ans = ""
for i in range(len(S)):
ans += chr(ord("A") + (ord(S[i]) + N) % ord("A") % (ord("Z") - ord("A")))
print(ans) | N = int(input())
S = input()
ans = ""
for i in range(len(S)):
ans += chr(ord("A") + (ord(S[i]) + N) % ord("A") % (ord("Z") - ord("A") + 1))
print(ans)
| [
"expression.operation.binary.add"
] | 655,071 | 655,072 | u589432040 | python |
p02848 | 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())
li=list(input())
for i in li:
num=a.index(i)+N
if num > 26:
num-=26
print(a[num],end="")
| 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())
li=list(input())
for i in li:
num=a.index(i)+N
if num >= 26:
num-=26
print(a[num],end="") | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 655,078 | 655,079 | u627283301 | python |
p02848 | n = int(input())
s = str(input())
alp = 'abcdefghijklmnopqrstuvwxyz' * 2
ss = ''
for i in range(len(s)):
ss += str(alp[alp.index(s[i])+n])
print(ss)
| n = int(input())
s = str(input())
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ss = ''
for i in range(len(s)):
ss += str(alp[alp.index(s[i])+n])
print(ss) | [
"literal.string.change",
"assignment.value.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 655,090 | 655,091 | u506587641 | python |
p02848 | def q2(in_num, in_str):
o_str = ""
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(in_str)):
o_str += (letters[(letters.index(in_str[i])+int(in_num))%26])
return o_str
q2(input(),input()) | def q2(in_num, in_str):
o_str = ""
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in range(len(in_str)):
o_str += (letters[(letters.index(in_str[i])+int(in_num))%26])
return o_str
print(q2(input(),input())) | [
"call.add",
"call.arguments.change"
] | 655,094 | 655,095 | u382687823 | python |
p02848 | import string
N = int(input())
S = list(input())
lis = list(string.ascii_uppercase)
answer = []
for s in S:
index = lis.index(s)
slide_index = index + N
if slide_index > 25:
slide_index -= 26
new_s = lis[slide_index]
answer.append(new_s)
answer = list(answer)
print(answer)
| import string
N = int(input())
S = list(input())
lis = list(string.ascii_uppercase)
answer = []
for s in S:
index = lis.index(s)
slide_index = index + N
if slide_index > 25:
slide_index -= 26
new_s = lis[slide_index]
answer.append(new_s)
answer = ''.join(answer)
print(answer)
| [
"assignment.value.change"
] | 655,101 | 655,102 | u379535139 | python |
p02848 | N = int(input())
S = input()
alphabet = 'ZABCDEFGHIJKLMNOPQRSTUVWXY'
alphabet_num = {st: num for num, st in enumerate(alphabet)}
alphabet_list = [st for st in alphabet]
for s in S:
num = (alphabet_num[s] + N) % 26
print(alphabet_list[num], end+'') | N = int(input())
S = input()
alphabet = 'ZABCDEFGHIJKLMNOPQRSTUVWXY'
alphabet_num = {st: num for num, st in enumerate(alphabet)}
alphabet_list = [st for st in alphabet]
for s in S:
num = (alphabet_num[s] + N) % 26
print(alphabet_list[num], end='') | [
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 655,103 | 655,104 | u661977789 | python |
p02848 | N = int(input())
S = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
for j in range(26):
if li[j] == sli[i]:
sli[i] == li[j+N]
print("".join(sli)) | N = int(input())
S = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
for j in range(26):
if li[j] == sli[i]:
sli[i] = li[j+N]
break
print("".join(sli)) | [
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo",
"control_flow.break.add"
] | 655,106 | 655,107 | u249218227 | python |
p02848 | S = input()
N = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
for j in range(26):
if li[j] == sli[i]:
sli[i] == li[j+N]
break
print("".join(sli)) | N = int(input())
S = input()
li = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
sli = list(S)
for i in range(len(sli)):
for j in range(26):
if li[j] == sli[i]:
sli[i] = li[j+N]
break
print("".join(sli)) | [
"assignment.variable.change",
"identifier.change",
"call.add",
"assignment.value.change",
"expression.operation.compare.replace.remove",
"assignment.replace.add",
"misc.typo"
] | 655,108 | 655,107 | u249218227 | python |
p02848 | # coding: utf-8
import string
alphabet = string.ascii_uppercase + string.ascii_uppercase
n_steps = int(input())
row_text = input()
processed_tuple = (alphabet[alphabet.index(x)+n_steps] for x in row_text)
print(*processed_tuple) | # coding: utf-8
import string
alphabet = string.ascii_uppercase + string.ascii_uppercase
n_steps = int(input())
row_text = input()
processed_tuple = (alphabet[alphabet.index(x)+n_steps] for x in row_text)
print(*processed_tuple, sep = '') | [
"call.arguments.add"
] | 655,116 | 655,117 | u511824539 | python |
p02848 | n = int(input())
s = list(input())
for i in range(len(s)):
s[i] = chr((ord(s[i])-65+n)%26+65)
print("".join(s[i])) | n = int(input())
s = list(input())
for i in range(len(s)):
s[i] = chr((ord(s[i])-65+n)%26+65)
print("".join(s)) | [] | 655,122 | 655,123 | u351480677 | python |
p02848 | alp_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
N = int(input())
S_list = list(input())
Slen = len(S_list)
S_return_list = []
print(Slen)
for i in range(0,Slen):
S_return_list.append(alp_list[(alp_list.index(S_list[i])+N)%26])
S_return="".join(S_return_list)
print('{}'.format(S_return)) | alp_list = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
N = int(input())
S_list = list(input())
Slen = len(S_list)
S_return_list = []
for i in range(0,Slen):
S_return_list.append(alp_list[(alp_list.index(S_list[i])+N)%26])
S_return="".join(S_return_list)
print('{}'.format(S_return)) | [
"call.remove"
] | 655,126 | 655,127 | u730321398 | python |
p02848 | n=int(input())
s=input()
l=list(s)
newcome=[]
alp=[chr(ord('A') + i) for i in range(26)]
for i in l:
a=alp.index(i)
if (a+n)<=26:
t=alp[a+n-1]
else:
t=alp[a+n-26]
newcome.append(t)
print("".join(newcome)) | n=int(input())
s=input()
l=list(s)
newcome=[]
alp=[chr(ord('A') + i) for i in range(26)]
for i in l:
a=alp.index(i)
if (a+n)<26:
t=alp[a+n]
else:
t=alp[a+n-26]
newcome.append(t)
print("".join(newcome)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 655,137 | 655,138 | u582663624 | python |
p02848 | n=int(input())
s=input()
l=list(s)
newcome=[]
alp=[chr(ord('A') + i) for i in range(26)]
for i in l:
a=alp.index(i)
if (a+n)<=26:
t=alp[a+n]
else:
t=alp[a+n-26]
newcome.append(t)
print("".join(newcome)) | n=int(input())
s=input()
l=list(s)
newcome=[]
alp=[chr(ord('A') + i) for i in range(26)]
for i in l:
a=alp.index(i)
if (a+n)<26:
t=alp[a+n]
else:
t=alp[a+n-26]
newcome.append(t)
print("".join(newcome)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 655,139 | 655,138 | u582663624 | python |
p02848 | 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)
| N = int(input())
S = input()
ret = ""
for s in list(S):
a = ord(s)
max_z_a = a - 26 if a + N > 90 else a
ret += chr(max_z_a + N)
print(ret)
| [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,141 | 655,142 | u105302073 | python |
p02848 | n=int(input())
s=list(input())
a=""
for c in s:
a+=chr((ord(c)-ord(a)+n)%26+ord(a))
print(a)
| n=int(input())
s=list(input())
a=""
for c in s:
a+=chr((ord(c)-ord("A")+n)%26+ord("A"))
print(a)
| [
"call.arguments.change",
"expression.operation.binary.change"
] | 655,149 | 655,150 | u118642796 | python |
p02848 |
N = int(input())
S = list(input())
# ordで文字からunicode数字を返す
# chrでunicode数字から文字を返す
def chr_change(chr, N):
""" print("chr is", chr)
print("N is", N)
print("ord(chr) is ", ord(chr))
"""
Num_AtoZ = ord("Z") - ord("A")
if ord(chr) + N > ord("Z"):
chg_chr = ord(chr) + N - Num_AtoZ -1
else:
chg_chr = ord(chr) + N
#print("chg_chr is", chg_chr)
return chg_chr
for i in range(N):
tmp_chr = S[i]
print(chr(chr_change(tmp_chr, N)), end = "")
print("\n")
|
N = int(input())
S = list(input())
# ordで文字からunicode数字を返す
# chrでunicode数字から文字を返す
def chr_change(chr, N):
""" print("chr is", chr)
print("N is", N)
print("ord(chr) is ", ord(chr))
"""
Num_AtoZ = ord("Z") - ord("A")
if ord(chr) + N > ord("Z"):
chg_chr = ord(chr) + N - Num_AtoZ -1
else:
chg_chr = ord(chr) + N
#print("chg_chr is", chg_chr)
return chg_chr
for i in range(len(S)):
tmp_chr = S[i]
print(chr(chr_change(tmp_chr, N)), end = "")
print("\n")
| [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 655,156 | 655,157 | u121161758 | python |
p02848 | n = int(input())
s = input()
for o in s:
print(chr((ord(o)+n-ord('A'))%27+ord('A')),end="")
print() | n = int(input())
s = input()
for o in s:
print(chr((ord(o)+n-ord('A'))%26+ord('A')),end="")
print() | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 655,166 | 655,167 | u424967964 | python |
p02848 | N=int(input())
S=input()
l="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
out=""
for i in S:
out += l[(l.index(i)+n)%26]
print(out) | n = int(input())
s = input()
l = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
out = ""
for c in s:
out += l[(l.index(c)+n)%26]
print(out) | [
"assignment.variable.change",
"identifier.change",
"misc.typo",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,168 | 655,169 | u032222383 | python |
p02848 | n=int(input())
s=str(input())
s1=''
alpha='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in s:
s1+=alpha[ord(i)-66+n]
print(s1) | n=int(input())
s=str(input())
s1=''
alpha='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in s:
s1+=alpha[ord(i)-65+n]
print(s1) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,174 | 655,175 | u231905444 | python |
p02848 | N = int(input())
res = ""
for i in list(input()):
ascii = ord(i)
n = ascii - 65
n = (n + N) % 26
res += chr(n + 65)
print(res == input()) | N = int(input())
res = ""
for i in list(input()):
ascii = ord(i)
n = ascii - 65
n = (n + N) % 26
res += chr(n + 65)
print(res) | [] | 655,178 | 655,179 | u586368075 | python |
p02848 | # coding: utf-8
# Your code here!
N = int(input())
res = ""
for i in list(input()):
ascii = ord(i)
n = ascii - 65
n = (n + N) % 26
res += chr(n + 65)
print(res == input()) | N = int(input())
res = ""
for i in list(input()):
ascii = ord(i)
n = ascii - 65
n = (n + N) % 26
res += chr(n + 65)
print(res) | [] | 655,180 | 655,179 | u586368075 | python |
p02848 | S=list(input())
N=int(input())
P=list()
jia= N%26
for i in range(len(S)):
xin= ord(S[i])+jia
if xin > ord("Z"):
xin-=26
zimu=chr(xin)
P+=zimu
p=''.join(P)
print(p)
| N=int(input())
S=list(input())
P=list()
jia= N%26
for i in range(len(S)):
xin= ord(S[i])+jia
if xin > ord("Z"):
xin-=26
zimu=chr(xin)
P+=zimu
p=''.join(P)
print(p)
| [
"assignment.remove",
"assignment.add"
] | 655,193 | 655,194 | u312807712 | python |
p02848 | n = int(input())
s = list(input())
for i in range(len(s)):
ascii = ord(s[i])
if((ascii+n)>90):
print(chr(65+(ascii+n-90)),end='')
else:
print(chr(ascii+n),end='')
| n = int(input())
s = list(input())
for i in range(len(s)):
ascii = ord(s[i])
if((ascii+n)>90):
print(chr(64+(ascii+n-90)),end='')
else:
print(chr(ascii+n),end='') | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 655,213 | 655,214 | u774197297 | python |
p02848 | import string
N = int(input())
S = input()
letters = string.ascii_uppercase + string.ascii_uppercase
letters = letters[N:N+26]
mapping = {s: letters[idx] for idx, s in enumerate(S)}
ans = "".join(map(lambda s: mapping[s], S))
print(ans, flush=True) | import string
N = int(input())
S = input()
letters = string.ascii_uppercase + string.ascii_uppercase
letters = letters[N:N+26]
mapping = {s: letters[idx] for idx, s in enumerate(string.ascii_uppercase)}
ans = "".join(map(lambda s: mapping[s], S))
print(ans, flush=True) | [
"assignment.value.change",
"call.arguments.change"
] | 655,229 | 655,230 | u218058474 | python |
p02848 | N = int(input())
S = input()
out = ''
for s in S:
out = out + chr((ord(s) + N - 65) % 26 + 65)
print(N, S)
print(out) | N = int(input())
S = input()
out = ''
for s in S:
out = out + chr((ord(s) + N - 65) % 26 + 65)
print(out) | [
"call.remove"
] | 655,235 | 655,236 | u880646180 | python |
p02848 | N = int(input())
S = list(input())
ans = []
abc = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q","r", "s", "t", "u", "v", "w", "x", "y", "z"]
for i in range(len(S)):
for j in range(len(abc)):
if S[i] == abc[j]:
if j + N < 26:
ans.append(abc[j + N])
else:
ans.append(abc[j + N -26])
print("".join(ans).upper())
| N = int(input())
S = list(input())
ans = []
abc = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q","r", "s", "t", "u", "v", "w", "x", "y", "z"]
for i in range(len(S)):
for j in range(len(abc)):
if S[i] == abc[j].upper():
if j + N < 26:
ans.append(abc[j + N])
else:
ans.append(abc[j + N -26])
print("".join(ans).upper())
| [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.add"
] | 655,237 | 655,238 | u213800869 | python |
p02848 | n = int(input())
s = input()
stdata = [chr(s) for s in range(ord("A"),ord("Z") + 1)]
ans = []
for i in range(len(s)):
ind = stdata.index(s[i])
ind = (ind + n) % 26
ans.append(stdata[ind])
for i in range(len(s)):
print(ans[i],end=" ")
| n = int(input())
s = input()
stdata = [chr(s) for s in range(ord("A"),ord("Z") + 1)]
ans = []
for i in range(len(s)):
ind = stdata.index(s[i])
ind = (ind + n) % 26
ans.append(stdata[ind])
for i in range(len(s)):
print(ans[i],end="")
| [
"literal.string.change",
"call.arguments.change",
"io.output.change"
] | 655,246 | 655,247 | u883203948 | python |
p02848 | s = int(input())
f = input()
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in f:
ans += a[a.index(i)+s]
print(ans) | s = int(input())
f = input()
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in f:
ans += a[a.index(i)+s]
print(ans) | [
"literal.string.change",
"assignment.value.change"
] | 655,248 | 655,249 | u705427370 | python |
p02848 | s = int(input())
f = input()
a = "ABCDEFGHIJKLNMOPQRSTUVWXYZ"
ans = ""
for i in f:
ans += a[a.index(i)+s]
print(ans)
| s = int(input())
f = input()
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
ans = ""
for i in f:
ans += a[a.index(i)+s]
print(ans) | [
"literal.string.change",
"assignment.value.change"
] | 655,250 | 655,249 | u705427370 | python |
p02848 | n = int(input())
s = input()
result = ''
for c in s:
result += chr((((ord(c) + n) -64) % 26) + 64)
print(result) | n = int(input())
s = input()
result = ''
for c in s:
result += chr((((ord(c) + n) -65) % 26) + 65)
print(result) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,255 | 655,256 | u695515016 | python |
p02848 | # ABC146B - ROT N
def main():
N = int(input())
S = input().rstrip()
ans = "".join([chr(64 + (ord(ch) + N - 64) % 26) for ch in S])
print(ans)
if __name__ == "__main__":
main() | # ABC146B - ROT N
def main():
N = int(input())
S = input().rstrip()
ans = "".join([chr(65 + (ord(ch) + N - 65) % 26) for ch in S])
print(ans)
if __name__ == "__main__":
main() | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,274 | 655,275 | u077291787 | python |
p02848 |
def main(N, S):
base = ord('A')
res = ''.join(chr((ord(s) - base + N) % 26 + base) for s in S)
print(res)
if __name__ == "__main__":
N = int(input('N >'))
S = input('S >')
main(N, S)
|
def main(N, S):
base = ord('A')
res = ''.join(chr((ord(s) - base + N) % 26 + base) for s in S)
print(res)
if __name__ == "__main__":
N = int(input(''))
S = input('')
main(N, S)
| [
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 655,276 | 655,277 | u646704748 | python |
p02848 | import string
l=string.ascii_uppercase
N=int(input())
S=input()
T=""
for i in range(len(S)):
for j in range(26):
if S[i]==l[j]:
T+=l[(i+N)%26]
break
print(T)
| import string
l=string.ascii_uppercase
N=int(input())
S=input()
T=""
for i in range(len(S)):
for j in range(26):
if S[i]==l[j]:
T+=l[(j+N)%26]
break
print(T)
| [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,282 | 655,283 | u903596281 | python |
p02848 | N = int(input())
S = input()
for i in range(len(S)):
tmp = ord(S[i])+2
if(tmp>90):
tmp -= 26
print(chr(tmp),end='')
print('') | N = int(input())
S = input()
for i in range(len(S)):
tmp = ord(S[i])+N
if(tmp>90):
tmp -= 26
print(chr(tmp),end='')
print('') | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 655,288 | 655,289 | u570685962 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.