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 9
values |
|---|---|---|---|---|---|---|---|
p02848 | k=int(input())
s=input()
n=len(s)
temp=""
for i in range(n):
z=ord(s[i])+k
if z>122:
z-=26
temp+=chr(z)
print(temp) | k=int(input())
s=input()
n=len(s)
temp=""
for i in range(n):
z=ord(s[i])+k
if z>90:
z-=26
temp+=chr(z)
print(temp) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 654,628 | 654,629 | u185405877 | python |
p02848 | k=int(input())
s=input()
n=len(s)
temp=""
for i in range(n):
z=ord(s[i])+k
if z>123:
z-=27
temp+=chr(z)
print(temp) | k=int(input())
s=input()
n=len(s)
temp=""
for i in range(n):
z=ord(s[i])+k
if z>90:
z-=26
temp+=chr(z)
print(temp) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 654,630 | 654,629 | u185405877 | python |
p02848 | # -*- coding: utf-8 -*-
import sys
import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入... | # -*- coding: utf-8 -*-
import sys
import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入... | [
"literal.string.change",
"call.arguments.change"
] | 654,631 | 654,632 | u007886915 | python |
p02848 | N = int(input())
S = str(input())
ans = []
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']
for i in range(len(S)):
tmp = lst.index(S[i])
tmp += N
if tmp > 25:
tmp -= 25
ans.append(lst[tmp])
print(''.join(ans))
| N = int(input())
S = str(input())
ans = []
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']
for i in range(len(S)):
tmp = lst.index(S[i])
tmp += N
if tmp > 25:
tmp -= 26
ans.append(lst[tmp])
print(''.join(ans))
| [
"literal.number.integer.change"
] | 654,633 | 654,634 | u166621202 | python |
p02848 | n=int(input())
s=input()
ans=''
for ss in s:
if ord(ss)+n<=ord('z'):
ss=chr(ord(ss)+n)
else:
ss=chr(ord(ss)+n-26)
ans+=ss
print(ans) | n=int(input())
s=input()
ans=''
for ss in s:
if ord(ss)+n<=ord('Z'):
ss=chr(ord(ss)+n)
else:
ss=chr(ord(ss)+n-26)
ans+=ss
print(ans) | [
"literal.string.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 654,639 | 654,640 | u932868243 | python |
p02848 | import string
N=int(input())
S=list(str(input()))
Alphabet_List=list(string.ascii_uppercase)
Alphabet_List.extend(2*Alphabet_List)
for i in range(len(S)):
for j in range(len(Alphabet_List)):
if S[i]==Alphabet_List[j]:
S[i]=Alphabet_List[j+13]
break
print(("").join(S)) | import string
N=int(input())
S=list(str(input()))
Alphabet_List=list(string.ascii_uppercase)
Alphabet_List.extend(2*Alphabet_List)
for i in range(len(S)):
for j in range(len(Alphabet_List)):
if S[i]==Alphabet_List[j]:
S[i]=Alphabet_List[j+N]
break
print(("").join(S)) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,647 | 654,648 | u847165882 | python |
p02848 | N=int(input())
S=input()
L='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
a=S[i]
index=L.find(a)
b=L[index+N]
ans=ans+b
prin(ans) | N=int(input())
S=input()
L='ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
a=S[i]
index=L.find(a)
b=L[index+N]
ans=ans+b
print(ans) | [
"identifier.change",
"call.function.change"
] | 654,649 | 654,650 | u830162518 | python |
p02848 | n = int(input())
moji = str(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"]
lst = list(moji)
for i in range(len(lst)):
num = alphabet.index(lst[i])
if i + n > 25:
lst[i] = alphabet[i+n-26]
else:
lst[i] =... | n = int(input())
moji = str(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"]
lst = list(moji)
for i in range(len(lst)):
num = alphabet.index(lst[i])
if num + n >= 26:
lst[i] = alphabet[num+n-26]
else:
lst... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 654,666 | 654,667 | u383450070 | python |
p02848 | n = int(input())
s = input()
so = ''
for i in range(len(s)):
ni = ord(s[i]) + n
if ni > 122:
ni -= 26
so += chr(ni)
print(so) | n = int(input())
s = input()
so = ''
for i in range(len(s)):
ni = ord(s[i]) + n
if ni > ord('Z'):
ni -= 26
so += chr(ni)
print(so) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.arguments.add"
] | 654,668 | 654,669 | u303739137 | python |
p02848 | n = int(input())
s = inuput()
alfha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in s:
a += alfha[(alfha.index(i)+n) % 26]
print(ans) | n = int(input())
s = input()
alfha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in s:
ans += alfha[(alfha.index(i)+n) % 26]
print(ans)
| [
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 654,674 | 654,675 | u455957070 | python |
p02848 | class RotN:
def __init__(self):
self.alphabet = [a for a in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']
def calculate(self, N, S):
result_list =[]
for s in S:
num = self.alphabet.index(s)
# アルファベットがZより大きくなる場合
if num + N > 25:
tmp = 25 - (num + N)
... | class RotN:
def __init__(self):
self.alphabet = [a for a in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']
def calculate(self, N, S):
result_list =[]
for s in S:
num = self.alphabet.index(s)
# アルファベットがZより大きくなる場合
if num + N > 25:
tmp = 25 - (num + N)
... | [
"call.add"
] | 654,694 | 654,695 | u189604332 | python |
p02848 | N = int(input())
S = input()
ans = ''
for i in range(len(S)):
temp = ord(S[i]) - ord('A')
ans += chr(ord("A") + temp%26 )
print(ans) | N = int(input())
S = input()
ans = ''
for i in range(len(S)):
temp = ord(S[i]) - ord('A') + N
ans += chr(ord("A") + temp%26 )
print(ans) | [
"assignment.change"
] | 654,700 | 654,701 | u137913818 | python |
p02848 | #import string
n = int(input())
s = input()
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
print(a)
x = ""
for i in s:
x += a[a.index(i)+n]
print(x)
| #import string
n = int(input())
s = input()
a = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
x = ""
for i in s:
x += a[a.index(i)+n]
print(x)
| [
"call.remove"
] | 654,708 | 654,709 | u207799478 | python |
p02848 | import sys
input=sys.stdin.readline
n=int(input())
L=input()
F=[]
for i in range(len(L)):
A=ord(L[i])+n
if A>=91:
A=A-91+65
F.append(chr(A))
print("".join(F))
| import sys
input=sys.stdin.readline
n=int(input())
L=input()[:-1]
F=[]
for i in range(len(L)):
A=ord(L[i])+n
if A>=91:
A=A-91+65
F.append(chr(A))
print("".join(F)) | [] | 654,721 | 654,722 | u690037900 | python |
p02848 | n = int(input())
s = input()
lenlen = len(s)
a = ''
for i in range(lenlen):
c = ord(s[i]) + n
print(c)
if 91 <= c:
c = c - 26
a = a + chr(c)
print(a)
| n = int(input())
s = input()
lenlen = len(s)
a = ''
for i in range(lenlen):
c = ord(s[i]) + n
if 91 <= c:
c = c - 26
a = a + chr(c)
print(a)
| [
"call.remove"
] | 654,725 | 654,726 | u357867755 | python |
p02848 | n=int(input())
s = list(input())
for l in s:
m = ((ord(l)-64)+n)%26+64
s = chr(m)
print(s,end="",sep="") | n=int(input())
s = list(input())
for l in s:
m = ((ord(l)-65)+n)%26+65
j = chr(m)
print(j,end="",sep="") | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"identifier.change",
"call.arguments.change",
"io.output.change"
] | 654,727 | 654,728 | u127499732 | python |
p02848 | #146 b
n=int(input())
s=input()
ans=""
for x in s:
num=(ord(x)+n)
if num>90:
num=65+num%90
ans+=chr(num)
print(ans) | #146 b
n=int(input())
s=input()
ans=""
for x in s:
num=(ord(x)+n)
if num>90:
num=64+num%90
ans+=chr(num)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 654,729 | 654,730 | u723583932 | python |
p02848 | N = int(input())
S = input()
ANS = ""
for MOJI in S:
i = ord(MOJI) + N
if i > 90:
i = i - 26
ANS.append(chr(i)) | N = int(input())
S = input()
ANS = ""
for MOJI in S:
i = ord(MOJI) + N
if i > 90:
i = i - 26
ANS = ANS + chr(i)
print(ANS) | [
"call.add"
] | 654,737 | 654,738 | u270467412 | python |
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(... | 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(... | [
"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, "... | 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... | [
"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... | 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:
... | 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))
els... | [
"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'... | 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'... | [
"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(ro... | 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(inpu... | 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(inpu... | [
"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:
ans... | 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:
... | [] | 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[... | 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.ind... | [
"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
e... |
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
e... | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 655,156 | 655,157 | u121161758 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.