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 | 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 |
p02848 | alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
a = ''
for item in S:
a_index = alphabet.index(item) + n
if a_index > 25:
a_index = a_index - 26
a += alphabet[a_index]
print(a)
| alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
N = int(input())
S = input()
a = ''
for item in S:
a_index = alphabet.index(item) + N
if a_index > 25:
a_index = a_index - 26
a += alphabet[a_index]
print(a)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 655,298 | 655,299 | u527993431 | python |
p02848 | import sys
N = int(input())
S = input()
alp = "ABCDEFGHIJKLMNOPQRSTUWVXYZABCDEFGHIJKLMNOPQRSTUWVXYZ"
for s in S:
sys.stdout.write(alp[ord(s) - 65 + N]) | import sys
N = int(input())
S = input()
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
for s in S:
sys.stdout.write(alp[ord(s) - 65 + N]) | [
"literal.string.change",
"assignment.value.change"
] | 655,303 | 655,304 | u893478938 | python |
p02848 | n = int(input())
s = input()
ans = ""
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for c in s:
ans += alphabet[alphabet.index(c) % 26]
print(ans) | n = int(input())
s = input()
ans = ""
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for c in s:
ans += alphabet[(n + alphabet.index(c)) % 26]
print(ans) | [] | 655,309 | 655,310 | u081193942 | python |
p02848 | n = int(input())
s = input()
alph_list = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
for i in s:
pos =alph_list.find(i)
print(alph_list[n+pos],end="") | n = int(input())
s = input()
alph_list = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
for i in s:
pos =alph_list.find(i)
print(alph_list[n+pos],end="") | [
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 655,313 | 655,314 | u942687220 | python |
p02848 | str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
a = int(input())
s = list(input())
ans = ''
for char in s:
c = str.index(char) + a
if c > 27:
c = c - 26
ans = ans + str[c] #文字列は加算できる
print(ans) | str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
a = int(input())
s = list(input())
ans = ''
for char in s:
c = str.index(char) + a
if c >= 26:
c = c - 26
ans = ans + str[c] #文字列は加算できる
print(ans) | [
"control_flow.loop.for.condition.change"
] | 655,315 | 655,316 | u445404615 | python |
p02848 | # input() は 'python3' で正常に動く
N = int(input())
S = input()
str_list = list(S)
str_trsf = []
for item in str_list:
str_trsf.extend(chr(N - (ord('Z') - ord(item)) + ord('A')) if ord(item) + N > ord('Z') else chr(ord(item) + N))
print(''.join(str_trsf)) | # input() は 'python3' で正常に動く
N = int(input())
S = input()
str_list = list(S)
str_trsf = []
for item in str_list:
str_trsf.extend(chr(N - (ord('Z') - ord(item) + 1) + ord('A')) if ord(item) + N > ord('Z') else chr(ord(item) + N))
print(''.join(str_trsf)) | [
"expression.operation.binary.add"
] | 655,321 | 655,322 | u447344061 | python |
p02848 | # input() は 'python3' で正常に動く
N = int(input())
S = input()
str_list = list(S)
str_trsf = []
for item in str_list:
str_trsf.extend(chr(N - (ord('Z') - ord(item)) + ord('A') if ord(item) + N > ord('Z') else chr(ord(item) + N)))
print(''.join(str_trsf)) | # input() は 'python3' で正常に動く
N = int(input())
S = input()
str_list = list(S)
str_trsf = []
for item in str_list:
str_trsf.extend(chr(N - (ord('Z') - ord(item) + 1) + ord('A')) if ord(item) + N > ord('Z') else chr(ord(item) + N))
print(''.join(str_trsf)) | [
"call.arguments.change"
] | 655,323 | 655,322 | u447344061 | python |
p02848 | N = int(input())
S = str(input())
s = list(S)
s_new =[]
for i in range(len(S)):
if ord(s[i])+N<=91:
s[i] = chr(ord(s[i])+N)
s_new.append(s[i])
else:
s[i] = chr(ord(s[i])+N-26)
s_new.append(s[i])
print(''.join(s_new))
| N = int(input())
S = str(input())
s = list(S)
s_new =[]
for i in range(len(S)):
if ord(s[i])+N<91:
s[i] = chr(ord(s[i])+N)
s_new.append(s[i])
else:
s[i] = chr(ord(s[i])+N-26)
s_new.append(s[i])
print(''.join(s_new))
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 655,327 | 655,328 | u906481659 | python |
p02848 | N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
if a.index(S[i]) + N > 26:
ans += a[a.index(S[i]) + N - 26]
else:
ans += a[a.index(S[i]) + N]
print(ans)
| N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
if a.index(S[i]) + N > 25:
ans += a[a.index(S[i]) + N - 26]
else:
ans += a[a.index(S[i]) + N]
print(ans) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 655,333 | 655,334 | u339922532 | python |
p02848 |
N= input()
S= input()
Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。
ANSWER = ""
#リストの中身をループ
for SS in LIST:
NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
NUNBER = NUNBER -65#アスキーコードからアルファベット順に変更
AFFTER = NUNBER + N
LAST = AFFTER % 26
# if LAST == 0:
# LAST = 26
LAST = chr(LAST+65)#アスキーコードからアルファベットに戻す
ANSWER = ANSWER + LAST
print(ANSWER)
| N= input()
S= input()
N = int(N)
Len = len(S)#文字数の長さ
LIST = list(S)#文字列を1文字ごとに分割する。
ANSWER = ""
#リストの中身をループ
for SS in LIST:
NUNBER = ord(SS)#アスキーコードを出す組み込み関数:1文字しか対応していない
NUNBER = NUNBER -65#アスキーコードからアルファベット順に変更
AFFTER = NUNBER + N
LAST = AFFTER % 26
LAST = chr(LAST+65)#アスキーコードからアルファベットに戻す
ANSWER = ANSWER + LAST
print(ANSWER) | [
"assignment.add"
] | 655,339 | 655,340 | u679236042 | python |
p02848 | N = int(input())
S = input()
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
w = ""
for x in S:
if abc.index(x) + N > 26:
w += abc[abc.index(x) + N - 26]
else:
w += abc[abc.index(x) + N]
print(w) | N = int(input())
S = input()
abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
w = ""
for x in S:
if abc.index(x) + 1 + N > 26:
w += abc[abc.index(x) + N - 26]
else:
w += abc[abc.index(x) + N]
print(w) | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 655,351 | 655,352 | u417063616 | python |
p02848 |
num = input()
s = input()
res = ""
for x in s:
loc = ord(x) + num
res += chr(loc - 26 if loc > 90 else loc)
print(res) | num = int(input())
s = input()
res = ""
for x in s:
loc = ord(x) + num
res += chr(loc - 26 if loc > 90 else loc)
print(res) | [
"call.add",
"call.arguments.change"
] | 655,353 | 655,354 | u868576171 | python |
p02848 | dict = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
new_str = ''
S = int(input())
strs = input()
for x in strs:
new_idx = (dict.index(x)+S)%26
new_str += str(new_idx)
print(new_str) | dict = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
new_str = ''
S = int(input())
strs = input()
for x in strs:
new_idx = (dict.index(x)+S)%26
new_str += str(dict[new_idx])
print(new_str) | [
"call.arguments.change"
] | 655,355 | 655,356 | u476195002 | python |
p02848 | if __name__ == '__main__':
N = int(input())
S = input()
al=[chr(ord('A') + i) for i in range(26)]
ans = ''
for s in S:
ans += al[(N+S.index(s))%26]
print(ans) | if __name__ == '__main__':
N = int(input())
S = input()
al=[chr(ord('A') + i) for i in range(26)]
ans = ''
for s in S:
ans += al[(N+al.index(s))%26]
print(ans) | [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,357 | 655,358 | u273017776 | python |
p02848 | N = int(input())
S = input()
int_A = 65
letters = 25
nums = [ord(char) for char in S]
nums = [(num - int_A + N) % letters for num in nums ]
print(''.join([chr(num + int_A) for num in nums])) | N = int(input())
S = input()
int_A = 65
letters = 26
nums = [ord(char) for char in S]
nums = [(num - int_A + N) % letters for num in nums ]
print(''.join([chr(num + int_A) for num in nums])) | [
"literal.number.integer.change",
"assignment.value.change"
] | 655,361 | 655,362 | u525193524 | python |
p02848 | def shiftText(plain_text, key):
plain_text.lower
encoded_text = ""
for i in plain_text:
char = ord(i)+key
if (char > 122):
char -= 26
encoded_text += chr(char)
else:
encoded_text += chr(char)
return encoded_text
key = int(input())
plain_text = input()
print(shiftText(plain_text, key))
| def shiftText(plain_text, key):
plain_text.lower
encoded_text = ""
for i in plain_text:
char = ord(i)+key
if (char > 90):
char -= 26
encoded_text += chr(char)
else:
encoded_text += chr(char)
return encoded_text
key = int(input())
plain_text = input()
print(shiftText(plain_text, key))
| [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 655,372 | 655,373 | u305917597 | python |
p02848 | n = int(input()) % 26
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + 2
if a > zn:
a -= zn
a += ord('A')-1
ret += chr(a)
print(ret) | n = int(input()) % 26
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + n
if a > zn:
a -= zn
a += ord('A')-1
ret += chr(a)
print(ret) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 655,384 | 655,385 | u469862086 | python |
p02848 | n = int(input())
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + 2
if a > zn:
a -= zn
a += ord('A')-1
ret += chr(a)
print(ret) | n = int(input()) % 26
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + n
if a > zn:
a -= zn
a += ord('A')-1
ret += chr(a)
print(ret) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 655,386 | 655,385 | u469862086 | python |
p02848 | n = int(input())
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + 2
if a > zn:
a -= zn
a += ord('A')
ret += chr(a)
print(ret) | n = int(input()) % 26
s = input()
zn = ord('Z')
ret = ''
for x in s:
a = ord(x) + n
if a > zn:
a -= zn
a += ord('A')-1
ret += chr(a)
print(ret) | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 655,387 | 655,385 | u469862086 | python |
p02848 | def solve(n: int, s: str) -> str:
def inc(c: str, n: int) -> str:
tbl = {
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',
23: 'W',
24: 'X',
25: 'Y',
26: 'Z',
}
rev_tbl = {v: k for k, v in tbl.items()}
idx = (rev_tbl[c] + n) % len(tbl)
return tbl[idx]
return ''.join([inc(c, n) for c in s])
n = int(input().strip())
s = input().strip()
print(solve(n, s))
| def solve(n: int, s: str) -> str:
def inc(c: str, n: int) -> str:
tbl = {
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',
}
rev_tbl = {v: k for k, v in tbl.items()}
idx = (rev_tbl[c] + n) % len(tbl)
return tbl[idx]
return ''.join([inc(c, n) for c in s])
n = int(input().strip())
s = input().strip()
print(solve(n, s))
| [
"literal.number.integer.change",
"assignment.value.change"
] | 655,396 | 655,397 | u456879951 | python |
p02848 | num = int(input())
str = list(input())
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
out=""
for i in range(len(str)):
for l in range(len(alp)):
if str[i]==alp[l]:
out+=alp[l+num]
break
print(out)
| num = int(input())
str = list(input())
alp = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
out=""
for i in range(len(str)):
for l in range(len(alp)):
if str[i]==alp[l]:
out+=alp[(l+num)%26]
break
print(out) | [
"expression.operation.binary.add"
] | 655,398 | 655,399 | u010462426 | python |
p02848 | n = int(input())
s = input()
s = list(s)
l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)
#print(s)
l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)
s1 = [0]*len(s)
s2 = [0]*len(s)
for i in range(len(s)):
s1[i] = l1.index(s[i])
for i in range(len(s)):
s2[i] = l2[s1[i]+n]
#リスト1つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
ans = ans + s2[i]
print(ans)
| n = int(input())
s = input()
s = list(s)
l1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
l1 = list(l1)
l2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
l2 = list(l2)
s1 = [0]*len(s)
s2 = [0]*len(s)
for i in range(len(s)):
s1[i] = l1.index(s[i])
for i in range(len(s)):
s2[i] = l2[s1[i]+n]
#リスト1つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
ans = ans + s2[i]
print(ans) | [
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 655,400 | 655,401 | u845937249 | python |
p02848 | n = int(input())
s = input()
s = list(s)
l1 = 'abcdefghijklmnopqrstuvwxyz'
l1 = list(l1)
l2 = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'
l2 = list(l2)
s1 = [0]*len(s)
s2 = [0]*len(s)
for i in range(len(s)):
s1[i] = l1.index(s[i])
for i in range(len(s)):
s2[i] = l2[s1[i]+n]
#リスト1つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
ans = ans + s2[i]
print(ans) | n = int(input())
s = input()
s = list(s)
l1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
l1 = list(l1)
l2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
l2 = list(l2)
s1 = [0]*len(s)
s2 = [0]*len(s)
for i in range(len(s)):
s1[i] = l1.index(s[i])
for i in range(len(s)):
s2[i] = l2[s1[i]+n]
#リスト1つずつくっつけて文字列にする
ans = ''
for i in range(len(s2)):
ans = ans + s2[i]
print(ans) | [
"literal.string.change",
"literal.string.case.change",
"assignment.value.change"
] | 655,402 | 655,401 | u845937249 | python |
p02848 | n = int(input())
s = str(input())
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUWVXYZ'
ALPHABET_LEN = len(ALPHABET)
prceed_val = n % ALPHABET_LEN
def trans(s):
pos = ALPHABET.index(s)
# print(s)
# print(pos)
newpos = pos + prceed_val
if newpos > ALPHABET_LEN - 1:
newpos = abs(ALPHABET_LEN - newpos)
# print(minus_pos)
# newpos = newpos + minus_pos
# print(newpos)
new_s = ALPHABET[newpos]
return new_s
new_str= ''.join([trans(_s) for _s in s])
print(new_str)
| n = int(input())
s = str(input())
ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ALPHABET_LEN = len(ALPHABET)
prceed_val = n % ALPHABET_LEN
def trans(s):
pos = ALPHABET.index(s)
# print(s)
# print(pos)
newpos = pos + prceed_val
if newpos > ALPHABET_LEN - 1:
newpos = abs(ALPHABET_LEN - newpos)
# print(minus_pos)
# newpos = newpos + minus_pos
# print(newpos)
new_s = ALPHABET[newpos]
return new_s
new_str= ''.join([trans(_s) for _s in s])
print(new_str)
| [
"literal.string.change",
"assignment.value.change"
] | 655,403 | 655,404 | u782967665 | python |
p02848 | sn = int(input())
str_ = input()
result = ''
for alphabet in str_:
t = ord(alphabet)
chr_int = t + sn
if chr_int > 91:
chr_int -= 26
result += chr(chr_int)
print(result) | sn = int(input())
str_ = input()
result = ''
for alphabet in str_:
t = ord(alphabet)
chr_int = t + sn
if chr_int > 90:
chr_int -= 26
result += chr(chr_int)
print(result) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 655,431 | 655,432 | u777997774 | python |
p02848 | N = int(input())
S = input().strip()
after = []
for s in S:
x = ord(s) + N
if x > ord('Z'):
x = x - ord('Z')
after.append(chr(x))
print(''.join(after))
| N = int(input())
S = input().strip()
after = []
for s in S:
x = ord(s) + N
if x > ord('Z'):
x = x - 26
after.append(chr(x))
print(''.join(after))
| [
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"expression.operation.binary.change",
"call.arguments.change"
] | 655,447 | 655,448 | u396205291 | python |
p02848 | N = input()
S= input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for a in S:
for i, Alpha in enumerate(Alphas):
if Alpha == a:
hoge.append(Alphas[(i+N)%26])
break
mojiretsu=''
for x in hoge:
mojiretsu += x
print(mojiretsu) | N = int(input())
S = input()
hoge=[]
Alphas='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
for a in S:
for i, Alpha in enumerate(Alphas):
if Alpha == a:
hoge.append(Alphas[(i+N)%26])
break
mojiretsu=''
for x in hoge:
mojiretsu += x
print(mojiretsu) | [
"call.add",
"call.arguments.change"
] | 655,450 | 655,451 | u893270619 | python |
p02848 | n = int(input())
s = list(input())
s.sort()
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z']
d_al = {'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}
al = al[n:] + al[:n]
ans = [al[d_al[i]] for i in s]
print(''.join(ans)) | n = int(input())
s = list(input())
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z']
d_al = {'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}
al = al[n:] + al[:n]
ans = [al[d_al[i]] for i in s]
print(''.join(ans))
| [
"call.remove"
] | 655,454 | 655,455 | u316401642 | python |
p02848 | n = int(input())
s = list(input())
s.sort()
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z']
d_al = {'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}
al = al[n:] + al[:n]
ans = [al[d_al[i]] for i in s]
print(''.join(ans)) | n = int(input())
s = list(input())
al = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z']
d_al = {'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}
al = al[n:] + al[:n]
ans = [al[d_al[i]] for i in s]
print(''.join(ans))
| [
"call.remove"
] | 655,456 | 655,455 | u316401642 | python |
p02848 | N = int(input())
S_list = list(input())
for i in range(0,len(S_list)):
M = ord(S_list[i])+N
if M > 90:
M -= 25
S_list[i] = chr(M)
print("".join(S_list)) | N = int(input())
S_list = list(input())
for i in range(0,len(S_list)):
M = ord(S_list[i])+N
if M > 90:
M -= 26
S_list[i] = chr(M)
print("".join(S_list)) | [
"literal.number.integer.change"
] | 655,459 | 655,460 | u670724685 | python |
p02848 | arphs = list(ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ)
n = int(input())
s = list(input())
i = []
for x in s:
i.append(arphs.index(x) + n)
print("".join(i)) | arphs = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = int(input())
s = list(input())
i = []
for x in s:
i.append(arphs[arphs.index(x) + n])
print("".join(i)) | [
"call.arguments.change"
] | 655,498 | 655,499 | u086127549 | python |
p02848 | N = int(input())
print("".join(map(lambda c: chr((c+N-65)%27+65), map(ord, input())))) | N = int(input())
print("".join(map(lambda c: chr((c+N-65)%26+65), map(ord, input())))) | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,504 | 655,505 | u602740328 | python |
p02848 | alf = ([chr(i) for i in range(ord("A"), ord("Z") + 1)])
N = int(input())
s = str(input())
S = list(s)
ans = []
for i in S:
num1 = alf.index(i)
print(num1)
num2 = num1 + N
if num2<= 25:
ans.append(alf[num2])
else:
ans.append(alf[num2-26])
Ans = "".join(ans)
print(Ans) | alf = ([chr(i) for i in range(ord("A"), ord("Z") + 1)])
N = int(input())
s = str(input())
S = list(s)
ans = []
for i in S:
num1 = alf.index(i)
num2 = num1 + N
if num2<= 25:
ans.append(alf[num2])
else:
ans.append(alf[num2-26])
Ans = "".join(ans)
print(Ans) | [
"call.remove"
] | 655,506 | 655,507 | u429319815 | python |
p02848 | # 2019-11-24 20:59:47(JST)
import sys
from string import ascii_uppercase as alphabet
# alpha_num = dict((alpha, num) for num, alpha in enumerate(alphabet, 0))
alpha_ind = dict((alphabet[i], i) for i in range(26))
def main():
n, s = sys.stdin.read().split()
n = int(n)
t = ''
for char in s:
t += alphabet[(alpha_num[char] + n) % 26]
print(t)
if __name__ == '__main__':
main()
| # 2019-11-24 20:59:47(JST)
import sys
from string import ascii_uppercase as alphabet
# alpha_num = dict((alpha, num) for num, alpha in enumerate(alphabet, 0))
alpha_ind = dict((alphabet[i], i) for i in range(26))
def main():
n, s = sys.stdin.read().split()
n = int(n)
t = ''
for char in s:
t += alphabet[(alpha_ind[char] + n) % 26]
print(t)
if __name__ == '__main__':
main()
| [
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,510 | 655,511 | u254871849 | python |
p02848 | n = int(input())
S = input()
ans = ''
for s in S:
i = ord(s) - ord('A')
print(i+n)
ans += chr((i+n)%26 + ord('A'))
print(ans) | n = int(input())
S = input()
ans = ''
for s in S:
i = ord(s) - ord('A')
ans += chr((i+n)%26 + ord('A'))
print(ans) | [
"call.remove"
] | 655,520 | 655,521 | u554954744 | python |
p02848 | n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()
for i in range(len(s)):
alp = s[i]
for j in range(26):
if alps[j] == alp:
number = (j + n) % 26
ans += alps[number]
| n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()
for i in range(len(s)):
alp = s[i]
for j in range(26):
if alps[j] == alp:
number = (j + n) % 26
ans += alps[number]
print(ans)
| [
"call.add"
] | 655,527 | 655,528 | u836984617 | python |
p02848 | n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()
for i in range(n):
alp = s[i]
for j in range(26):
if alps[j] == alp:
number = (j + n) % 26
ans += alps[number]
print(ans) | n = int(input())
s = input()
alps = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
number = 0
ans = str()
for i in range(len(s)):
alp = s[i]
for j in range(26):
if alps[j] == alp:
number = (j + n) % 26
ans += alps[number]
print(ans)
| [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 655,529 | 655,528 | u836984617 | python |
p02848 | n=int(input())
for c in input():print(chr(64+(ord(c)-64+n)%26),end="") | n=int(input())
for c in input():print(chr(65+(ord(c)-65+n)%26),end="") | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 655,530 | 655,531 | u670180528 | python |
p02848 | n=int(input())
z=input()
s=list(z)
n=n%26
a=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
x=int(len(s))
d=[]
for i in range(x):
b=s.pop(0)
y=a.index(b)
if y+n>25:
c=y+n-25
else:
c=y+n
d.append(a[c])
v=int(0)
ans=''.join(d)
print(ans)
| n=int(input())
z=input()
s=list(z)
n=n%26
a=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
x=int(len(s))
d=[]
for i in range(x):
b=s.pop(0)
y=a.index(b)
if y+n>25:
c=y+n-26
else:
c=y+n
d.append(a[c])
v=int(0)
ans=''.join(d)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,534 | 655,535 | u126183307 | python |
p02848 | n = int(input())
s = input()
ns = []
for ch in s:
if ('A' <= ch and ch <= 'Z'):
ns.append(chr((ord(ch) - ord('A') - n) % 26 + ord('A')))
print("".join(ns)) | n = int(input())
s = input()
ns = []
for ch in s:
if ('A' <= ch and ch <= 'Z'):
ns.append(chr((ord(ch) - ord('A') + n) % 26 + ord('A')))
print("".join(ns))
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,560 | 655,561 | u368796742 | python |
p02848 | import sys,queue,copy,math
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')
N = int(input())
S = list(input())
x = ""
ans =list()
for x in S:
#temp = (chr(ord(x)-ord("A")+1+N))
if ord(x)+N > ord('Z'):
ans.append(ord('A') + (ord(x) + N - (ord('Z'))))
else:
ans.append(ord(x) + N)
ANS = list()
for i in range (len(S)):
ANS.append(chr(ans[i]))
print("".join(ANS))
| import sys,queue,copy,math
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')
N = int(input())
S = list(input())
x = ""
ans =list()
for x in S:
if ord(x)+N > ord('Z'):
ans.append(ord('A') + (ord(x) + N - (ord('Z')))-1)
else:
ans.append(ord(x) + N)
ANS = list()
for i in range(len(S)):
ANS.append(chr(ans[i]))
print("".join(ANS))
| [
"expression.operation.binary.add"
] | 655,582 | 655,583 | u723843066 | python |
p02848 | n=int(input())
s=str(input())
t=''
for i in range(len(s)):
if ord(s[i])+n > 90:
t += chr(65+ord(s[i])+n-90)
else:
t += chr(ord(s[i])+n)
print(t) | n=int(input())
s=str(input())
t=''
for i in range(len(s)):
if ord(s[i])+n > 90:
t += chr(64+ord(s[i])+n-90)
else:
t += chr(ord(s[i])+n)
print(t)
| [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,591 | 655,592 | u194369107 | python |
p02848 | import string
slice_num = int(input())
string_dic = list(input())
omoji = [chr(i) for i in range(65,65+26)]
print(string_dic)
for i in range(len(string_dic)):
string_dic[i] = omoji[(omoji.index(string_dic[i])+slice_num)%26]
for i in range(len(string_dic)):
print(string_dic[i],end="") | import string
slice_num = int(input())
string_dic = list(input())
omoji = [chr(i) for i in range(65,65+26)]
for i in range(len(string_dic)):
string_dic[i] = omoji[(omoji.index(string_dic[i])+slice_num)%26]
for i in range(len(string_dic)):
print(string_dic[i],end="") | [
"call.remove"
] | 655,597 | 655,598 | u197922478 | python |
p02848 | n = int(input())
s = str(input())
alfaA = [chr(i) for i in range(65, 65+26)]
alfaB = [chr(i) for i in range(65, 65+26)]
alfa = alfaA + alfaB
ans = []
for i in s:
ans.append(alfa[alfa.index(i) + 2])
print(''.join(ans)) | n = int(input())
s = str(input())
alfaA = [chr(i) for i in range(65, 65+26)]
alfaB = [chr(i) for i in range(65, 65+26)]
alfa = alfaA + alfaB
ans = []
for i in s:
ans.append(alfa[alfa.index(i) + n])
print(''.join(ans)) | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,614 | 655,615 | u185502200 | python |
p02848 | key=int(input())
s=input()
for x in s:
print(chr((ord(x)-64 + key%26)%26 + 64),end='') | key=int(input())
s=input()
for x in s:
print(chr((ord(x)-65 + key%26)%26 + 65),end='') | [
"literal.number.integer.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 655,616 | 655,617 | u859773831 | python |
p02848 | N=int(input())
S=input()
st=""
n2=0
for i in range(N):
c1=S[i]
n1=ord(c1)
if n1+N>26:
n2=(((n1-65)+N)%26)+65
else:
n2=n1
st=st+chr(n2)
print(st) | N=int(input())
S=input()
st=""
n2=0
for i in range(len(S)):
c1=S[i]
n1=ord(c1)
if n1+N>26:
n2=(((n1-65)+N)%26)+65
else:
n2=n1
st=st+chr(n2)
print(st) | [
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change",
"call.arguments.add"
] | 655,618 | 655,619 | u318165580 | python |
p02848 | n = int(input())
s = input()
t = ''
abc = [chr(i) for i in range(65, 65+26)]
for i in s:
m = abc.index(i)
if m+n <= 25:
t += abc[m+n]
else:
t += abc[m+n-25]
print(t) | n = int(input())
s = input()
t = ''
abc = [chr(i) for i in range(65, 65+26)]
for i in s:
m = abc.index(i)
if m+n <= 25:
t += abc[m+n]
else:
t += abc[m+n-26]
print(t) | [
"literal.number.integer.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,620 | 655,621 | u144616794 | python |
p02848 | n=int(input())
s=input()
l=["A","B","C","D","E","F","G","H","I","J","K","L","M","","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
ans=""
for a in s:
index = l.index(a)
index=(index+n)%26
ans += l[index]
print(ans) | 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"]
ans=""
for a in s:
index = l.index(a)
index=(index+n)%26
ans += l[index]
print(ans)
| [
"literal.string.change",
"assignment.value.change"
] | 655,633 | 655,634 | u533232830 | python |
p02848 | n=int(input())
s=input()
l=["A","B","C","D","E","F","G","H","I","J","K","L","M","L","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
ans=""
for a in s:
index = l.index(a)
index=(index+n)%26
ans += l[index]
print(ans) | 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"]
ans=""
for a in s:
index = l.index(a)
index=(index+n)%26
ans += l[index]
print(ans)
| [
"literal.string.change",
"assignment.value.change"
] | 655,635 | 655,634 | u533232830 | python |
p02848 | N=int(input())
S=input()
l=[0]*len(S)
for i in range(len(S)):
if ord(S[i])+2<=90:
l[i]=chr(ord(S[i])+N)
else:
l[i]=chr(ord(S[i])+N-26)
print(''.join(l))
| N=int(input())
S=input()
l=[0]*len(S)
for i in range(len(S)):
if ord(S[i])+N<=90:
l[i]=chr(ord(S[i])+N)
else:
l[i]=chr(ord(S[i])+N-26)
print(''.join(l))
| [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change"
] | 655,640 | 655,641 | u688319022 | python |
p02848 | n=int(input())
s=input()
s_lst=[]
for i in range(len(s)):
o_s=ord(s[i])+n
if o_s>=90:
o_s=o_s-25
s_lst.append(chr(o_s))
print(''.join(s_lst)) | n=int(input())
s=input()
s_lst=[]
for i in range(len(s)):
o_s=ord(s[i])+n
if o_s>90:
o_s=o_s-26
s_lst.append(chr(o_s))
print(''.join(s_lst)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,648 | 655,649 | u405660020 | python |
p02848 | n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b = ""
for i in s:
j = (s.index(i) + n) % 26
b += s[j]
print(b) | n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b = ""
for i in s:
j = (alpha.index(i) + n) % 26
b += alpha[j]
print(b)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 655,660 | 655,661 | u571969099 | python |
p02848 | n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWSYZ"
b = ""
for i in s:
j = (s.index(i) + n) % 26
b += s[j]
print(b) | n = int(input())
s = input()
alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
b = ""
for i in s:
j = (alpha.index(i) + n) % 26
b += alpha[j]
print(b)
| [
"literal.string.change",
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 655,662 | 655,661 | u571969099 | python |
p02848 | import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def S():
res = list(sys.stdin.readline())
if res[-1] == "\n":
return res[:-1]
return res
def IR(n):
return [I() for i in range(n)]
# A
def A():
s = input()
if s == 'SUN':
print(7)
if s == "MON":
print(6)
if s == "TUE":
print(5)
if s == "WED":
print(4)
if s == "THU":
print(3)
if s == "FRI":
print(2)
if s == "SAT":
print(1)
return
# B
def B():
al = list("ABCDEFGHIJKLMNOIQRSTUVWXYZ")
n = I()
s = S()
for i in range(len(s)):
ni = (al.index(s[i]) + n) % 26
s[i] = al[ni]
print(''.join(s))
return
# C
def C():
return
# D
def D():
return
# E
def E():
return
# F
def F():
return
# Unittest
def resolve():
B()
return
# Solve
if __name__ == "__main__":
B()
| import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def S():
res = list(sys.stdin.readline())
if res[-1] == "\n":
return res[:-1]
return res
def IR(n):
return [I() for i in range(n)]
# A
def A():
s = input()
if s == 'SUN':
print(7)
if s == "MON":
print(6)
if s == "TUE":
print(5)
if s == "WED":
print(4)
if s == "THU":
print(3)
if s == "FRI":
print(2)
if s == "SAT":
print(1)
return
# B
def B():
al = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
n = I()
s = S()
for i in range(len(s)):
ni = (al.index(s[i]) + n) % 26
s[i] = al[ni]
print(''.join(s))
return
# C
def C():
return
# D
def D():
return
# E
def E():
return
# F
def F():
return
# Unittest
def resolve():
B()
return
# Solve
if __name__ == "__main__":
B()
| [
"literal.string.change",
"assignment.value.change",
"call.arguments.change"
] | 655,667 | 655,668 | u288802485 | python |
p02848 | # -*- coding: utf-8 -*-
"""
AtCoder A
"""
import sys, math, random
import numpy as np
# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def main():
N=I()
A=S()
al="ABCDEFGHIJKLMNOPQWSTUVWXYZ"
out=""
for a in A:
x=al.find(a)
x+=N
while x>25:
x-=26
out+=al[x]
print(out)
if __name__ == "__main__":
main() | # -*- coding: utf-8 -*-
"""
AtCoder A
"""
import sys, math, random
import numpy as np
# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def main():
N=I()
A=S()
al="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
out=""
for a in A:
x=al.find(a)
x+=N
while x>25:
x-=26
out+=al[x]
print(out)
if __name__ == "__main__":
main() | [
"literal.string.change",
"assignment.value.change"
] | 655,669 | 655,670 | u558699902 | python |
p02848 | n = int(input())
s = input()
def f(c):
r = ord(c) + n
if 90 < r:
r = r - (r // 90) * 26
print(r)
return chr(r)
r = ''
for i in s:
r += f(i)
print(r)
| n = int(input())
s = input()
def f(c):
r = ord(c) + n
if 90 < r:
r = r - (r // 90) * 26
return chr(r)
r = ''
for i in s:
r += f(i)
print(r)
| [
"call.remove"
] | 655,671 | 655,672 | u339503988 | python |
p02848 | N=int(input())
S=input()
M="ABCDEFGHIJLLMNOPQRSTUVWXYZABCDEFGHIJLLMNOPQRSTUVWXYZ"
for i in range(len(S)):
for j in range(26):
if S[i]==M[j] :
print(M[j+N],end="") | N=int(input())
S=input()
M="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(S)):
for j in range(26):
if S[i]==M[j] :
print(M[j+N],end="") | [
"literal.string.change",
"assignment.value.change"
] | 655,678 | 655,679 | u311636831 | python |
p02848 | n=int(input())
s=input()
ans=""
for i in range(len(s)):
ans+=chr((ord(s[i])+n)//26+64)
print(ans)
| n=int(input())
s=input()
ans=""
for i in range(len(s)):
ans+=chr((ord(s[i])+n-65)%26+65)
print(ans)
| [
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"literal.number.integer.change"
] | 655,695 | 655,696 | u121921603 | python |
p02848 | n = int(input())
s = input()
low = s.lower()
plain = ''
for i in list(low):
ASCII = ord(i)
num = ASCII - 97
num = (num - n) % 26
ASCII = num + 97
plain += chr(ASCII)
print(plain.upper()) | n = int(input())
s = input()
low = s.lower()
plain = ''
for i in list(low):
ASCII = ord(i)
num = ASCII - 97
num = (num + n) % 26
ASCII = num + 97
plain += chr(ASCII)
print(plain.upper()) | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,706 | 655,707 | u303384315 | python |
p02848 | N = int(input())
S = str(input())
def rot(s, num):
ans = []
for i in range(len(s)):
temp = ord(s[i])
if 65 <= temp + num < 90:
ans.append(chr(temp + num))
else:
ans.append(chr(65 + (temp + num) - 91))
temp_ans = "".join(ans)
return temp_ans
print(rot(s = S, num = N)) | N = int(input())
S = str(input())
def rot(s, num):
ans = []
for i in range(len(s)):
temp = ord(s[i])
if 65 <= temp + num <= 90:
ans.append(chr(temp + num))
else:
ans.append(chr(65 + (temp + num) - 91))
temp_ans = "".join(ans)
return temp_ans
print(rot(s = S, num = N)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 655,722 | 655,723 | u887886407 | python |
p02848 | n = int(input())
s = list(input())
alpha = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
i = 0
while i < len(s):
j = 0
while j < 26:
if s[i] == alpha[j]:
s[i] = alpha[i+n]
break
else:j += 1
i += 1
k = 0
while k < len(s) :
print(s[k],end ="")
k += 1 | n = int(input())
s = list(input())
alpha = list("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ")
i = 0
while i < len(s):
j = 0
while j < 26:
if s[i] == alpha[j]:
s[i] = alpha[j+n]
break
else:j += 1
i += 1
k = 0
while k < len(s) :
print(s[k],end ="")
k += 1 | [
"assignment.value.change",
"identifier.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,730 | 655,731 | u225845681 | python |
p02848 | Num=int(input())
String=input()
Library=[['A',1],['B',2],['C',3],['D',4],['E',5],['F',6],['G',7],['H',8],['I',9],['J',10],['K',11],['L',12],['M',13],['N',14],['O',15],['P',16],['Q',17],['R',18],['S',19],['T',20],['U',21],['V',22],['W',23],['X',24],['Y',25],['Z',26]]
newstring=''
for i in String:
for j in range(0,25):
if i==Library[j][0]:
oldstring=newstring
newstring=oldstring+Library[(j+Num)%26][0]
print(newstring) | Num=int(input())
String=input()
Library=[['A',1],['B',2],['C',3],['D',4],['E',5],['F',6],['G',7],['H',8],['I',9],['J',10],['K',11],['L',12],['M',13],['N',14],['O',15],['P',16],['Q',17],['R',18],['S',19],['T',20],['U',21],['V',22],['W',23],['X',24],['Y',25],['Z',26]]
newstring=''
for i in String:
for j in range(0,26):
if i==Library[j][0]:
oldstring=newstring
newstring=oldstring+Library[(j+Num)%26][0]
print(newstring) | [
"literal.number.integer.change",
"call.arguments.change",
"control_flow.loop.range.bounds.upper.change"
] | 655,734 | 655,735 | u311176548 | python |
p02848 | kotae=[]
N = int(input())
Sst=input()
S = list(Sst)
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','Q','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','Q','V','W','X','Y','Z','A','B','C']
for i in range(len(Sst)):
for j in range(26):
if S[i] == L[j]:
kotae.append(L[j+N])
Sed = "".join(kotae)
print(Sed) | kotae=[]
N = int(input())
Sst=input()
S = list(Sst)
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C']
for i in range(len(Sst)):
for j in range(26):
if S[i] == L[j]:
kotae.append(L[j+N])
Sed = "".join(kotae)
print(Sed) | [
"literal.string.change",
"assignment.value.change"
] | 655,736 | 655,737 | u840988663 | python |
p02848 | num = int(input())
al = input()
newal = ""
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(al)):
if(alp.index(al[i])+num>25):
newal = newal + alp[(alp.index(al[i])+num)-25]
else:
newal = newal + alp[alp.index(al[i])+num]
print(newal) | num = int(input())
al = input()
newal = ""
alp = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i in range(len(al)):
if(alp.index(al[i])+num>25):
newal = newal + alp[(alp.index(al[i])+num)-26]
else:
newal = newal + alp[alp.index(al[i])+num]
print(newal) | [
"literal.number.integer.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,755 | 655,756 | u310108817 | python |
p02848 | n = int(input())-97
s = input()
ans = ''
for x in s:
ans += chr((ord(x)+n)%26 + 97)
print(ans) | n = int(input())-65
s = input()
ans = ''
for x in s:
ans += chr((ord(x)+n)%26 + 65)
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 655,763 | 655,762 | u424240341 | python |
p02848 | n=int(input())
s=str(input())
l=list(s)
t=len(s)
for i in range(t):
if ord(l[i])+2<65+26:
l[i]=chr(ord(l[i])+2)
else:
l[i]=chr(ord(l[i])+2-26)
ans="".join(l)
print(ans)
| n=int(input())
s=str(input())
l=list(s)
t=len(s)
for i in range(t):
if ord(l[i])+n<65+26:
l[i]=chr(ord(l[i])+n)
else:
l[i]=chr(ord(l[i])+n-26)
ans="".join(l)
print(ans) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,768 | 655,769 | u517388115 | python |
p02848 | from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools
logging.basicConfig(level=logging.ERROR)
input = sys.stdin.readline
setrecursionlimit(1000000)
def main():
n = int(input())
s = input()[:-1]
ans = ''
for i in s:
p = ord(i) + n
print(p)
ans += chr(p if p < 91 else p-26)
print(ans)
def factorization(n):
if n<2:
return []
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.append([temp, 1])
if arr==[]:
arr.append([n, 1])
return arr
def cmb(n,r):
r = min(n-r,r)
if r == 0: return 1
over = reduce(mul, range(n, n - r, -1))
under = reduce(mul, range(1,r + 1))
return over // under
def zip(a):
mae = a[0]
ziparray = [mae]
for i in range(1,len(a)):
if(mae != a[i]):
ziparray.append(a[i])
mae = a[i]
return ziparray
def is_prime(n):
if n < 2: return False
for k in range(2, int(math.sqrt(n)) + 1):
if n % k == 0:
return False
return True
def list_replace(n,f,t):
return [t if i==f else i for i in n]
def base_10_to_n(X, n):
X_dumy = X
out = ''
while X_dumy>0:
out = str(X_dumy%n)+out
X_dumy = int(X_dumy/n)
if(out == ''): return '0'
return out
def gcd(numbers):
return reduce(fractions.gcd, numbers)
def lcm(numbers):
return reduce(lcm_base, numbers, 1)
def lcm_base(x, y):
return (x * y) // fractions.gcd(x, y)
class Queue():
def __init__(self):
self.q = deque([])
def push(self,i):
self.q.append(i)
def pop(self):
return self.q.popleft()
def size(self):
return len(self.q)
def debug(self):
return self.q
class Stack():
def __init__(self):
self.q = []
def push(self,i):
self.q.append(i)
def pop(self):
return self.q.pop()
def size(self):
return len(self.q)
def debug(self):
return self.q
class graph():
def __init__(self):
self.graph = defaultdict(list)
def addnode(self,l):
f,t = l[0],l[1]
self.graph[f].append(t)
self.graph[t].append(f)
def rmnode(self,l):
f,t = l[0],l[1]
self.graph[f].remove(t)
self.graph[t].remove(f)
def linked(self,f):
return self.graph[f]
class dgraph():
def __init__(self):
self.graph = defaultdict(set)
def addnode(self,l):
f,t = l[0],l[1]
self.graph[f].append(t)
def rmnode(self,l):
f,t = l[0],l[1]
self.graph[f].remove(t)
def linked(self,f):
return self.graph[f]
class PriorityQueue():
def __init__(self):
self.queue = []
def push(self,i):
heapq.heappush(self.queue,-i)
def pop(self):
return -1 * heapq.heappop(self.queue)
def sum(self):
return -sum(self.queue)
main()
| from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools
logging.basicConfig(level=logging.ERROR)
input = sys.stdin.readline
setrecursionlimit(1000000)
def main():
n = int(input())
s = input()[:-1]
ans = ''
for i in s:
p = ord(i) + n
ans += chr(p if p < 91 else p-26)
print(ans)
def factorization(n):
if n<2:
return []
arr = []
temp = n
for i in range(2, int(-(-n**0.5//1))+1):
if temp%i==0:
cnt=0
while temp%i==0:
cnt+=1
temp //= i
arr.append([i, cnt])
if temp!=1:
arr.append([temp, 1])
if arr==[]:
arr.append([n, 1])
return arr
def cmb(n,r):
r = min(n-r,r)
if r == 0: return 1
over = reduce(mul, range(n, n - r, -1))
under = reduce(mul, range(1,r + 1))
return over // under
def zip(a):
mae = a[0]
ziparray = [mae]
for i in range(1,len(a)):
if(mae != a[i]):
ziparray.append(a[i])
mae = a[i]
return ziparray
def is_prime(n):
if n < 2: return False
for k in range(2, int(math.sqrt(n)) + 1):
if n % k == 0:
return False
return True
def list_replace(n,f,t):
return [t if i==f else i for i in n]
def base_10_to_n(X, n):
X_dumy = X
out = ''
while X_dumy>0:
out = str(X_dumy%n)+out
X_dumy = int(X_dumy/n)
if(out == ''): return '0'
return out
def gcd(numbers):
return reduce(fractions.gcd, numbers)
def lcm(numbers):
return reduce(lcm_base, numbers, 1)
def lcm_base(x, y):
return (x * y) // fractions.gcd(x, y)
class Queue():
def __init__(self):
self.q = deque([])
def push(self,i):
self.q.append(i)
def pop(self):
return self.q.popleft()
def size(self):
return len(self.q)
def debug(self):
return self.q
class Stack():
def __init__(self):
self.q = []
def push(self,i):
self.q.append(i)
def pop(self):
return self.q.pop()
def size(self):
return len(self.q)
def debug(self):
return self.q
class graph():
def __init__(self):
self.graph = defaultdict(list)
def addnode(self,l):
f,t = l[0],l[1]
self.graph[f].append(t)
self.graph[t].append(f)
def rmnode(self,l):
f,t = l[0],l[1]
self.graph[f].remove(t)
self.graph[t].remove(f)
def linked(self,f):
return self.graph[f]
class dgraph():
def __init__(self):
self.graph = defaultdict(set)
def addnode(self,l):
f,t = l[0],l[1]
self.graph[f].append(t)
def rmnode(self,l):
f,t = l[0],l[1]
self.graph[f].remove(t)
def linked(self,f):
return self.graph[f]
class PriorityQueue():
def __init__(self):
self.queue = []
def push(self,i):
heapq.heappush(self.queue,-i)
def pop(self):
return -1 * heapq.heappop(self.queue)
def sum(self):
return -sum(self.queue)
main()
| [
"call.remove"
] | 655,772 | 655,773 | u676059589 | python |
p02848 | n = int(input())
s = input()
arr = "a b c d e f g h j i k l m n o p q r s t u v w x y z".upper().split()
arr = arr[:] + arr[:] + ["A"]
sol = []
for t in s:
for i in range(26):
if t == arr[i]:
sol.append(arr[i+n])
break
print("".join(sol)) | n = int(input())
s = input()
arr = "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".upper().split()
arr = arr[:] + arr[:] + ["A"]
sol = []
for t in s:
for i in range(26):
if t == arr[i]:
sol.append(arr[i+n])
break
print("".join(sol)) | [
"literal.string.change",
"assignment.value.change"
] | 655,774 | 655,775 | u078181689 | python |
p02848 | N = int(input())
S = input()
for s in S:
s = ord(s)
if (s + N) <= 90:
s += N
else:
s = s + N - 26
s = chr(s)
print(s)
| N = int(input())
S = input()
for s in S:
s = ord(s)
if (s + N) <= 90:
s += N
else:
s = s + N - 26
s = chr(s)
print(s ,end="")
| [
"call.arguments.add"
] | 655,782 | 655,783 | u697559326 | python |
p02848 | a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N = input()
S = list(input())
ans = ""
for s in S:
i = (a.index(s)+N)%26
ans += a[i]
print(ans)
| a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
N = int(input())
S = list(input())
ans = ""
for s in S:
i = (a.index(s)+N)%26
ans += a[i]
print(ans)
| [
"call.add",
"call.arguments.change"
] | 655,789 | 655,790 | u978178314 | python |
p02848 | N = int(input())
S = input()
alp = 'ABCDEFGEIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
k = alp.find(S[i])
ans += alp[(k+N)%26]
print(ans) | N = int(input())
S = input()
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans=''
for i in range(len(S)):
k = alp.find(S[i])
ans += alp[(k+N)%26]
print(ans) | [
"literal.string.change",
"assignment.value.change"
] | 655,793 | 655,794 | u749359783 | python |
p02848 | from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
S = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2
sn = ""
for i in s:
sn += S[S.index(i)+2]
print(sn) | from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()
S = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'*2
sn = ""
for i in s:
sn += S[S.index(i)+n]
print(sn) | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,797 | 655,798 | u987164499 | python |
p02848 | import math
n=int(input())
s=input()
t=''
num1=lambda c:chr(c+64)
for i in range(len(s)):
t+=num1((ord(s[i])-64+n)%26)
print(t)
| import math
n=int(input())
s=input()
t=''
num1=lambda c:chr(c+65)
for i in range(len(s)):
t+=num1((ord(s[i])-65+n)%26)
print(t)
| [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 655,817 | 655,818 | u821712904 | python |
p02848 | n=int(input())
s=input()
s2=""
for i in range(len(s)):
if ord(s[i])+n>90:
s2+chr(ord(s[i])+n-90+64)
else:
s2+chr(ord(s[i])+n)
print(s2) | n=int(input())
s=input()
s2=""
for i in range(len(s)):
if ord(s[i])+n>90:
s2+=chr(ord(s[i])+n-90+64)
else:
s2+=chr(ord(s[i])+n)
print(s2)
| [
"assignment.compound.arithmetic.replace.add",
"expression.operator.arithmetic.replace.remove",
"expression.operation.binary.change"
] | 655,832 | 655,833 | u341267151 | python |
p02848 | N = int(input('int'))
S = input('string')
alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
new_string = ''
for s in S:
new_string += (alphabets[(alphabets.index(s) + N) % 26])
print(new_string) | N = int(input())
S = input()
alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',
'V', 'W', 'X', 'Y', 'Z']
new_string = ''
for s in S:
new_string += (alphabets[(alphabets.index(s) + N) % 26])
print(new_string)
| [] | 655,838 | 655,839 | u043869840 | python |
p02848 | N = int(input())
S = input()
Sr = []
al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(len(S)):
m = al.index(S[i])
n = (1 + n + N) % 26 - 1
Sr.append(al[n])
print(''.join(Sr)) | N = int(input())
S = input()
Sr = []
al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(len(S)):
m = al.index(S[i])
n = (1 + m + N) % 26 - 1
Sr.append(al[n])
print(''.join(Sr)) | [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change"
] | 655,844 | 655,845 | u533713111 | python |
p02848 | N = int(input())
S = input()
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def get_str_leading_n(string, alphabets, N):
index_ = (alphabets.index(string.upper()) + N) // 26
return alphabets[index_]
output = "".join(list(map(lambda p: get_str_leading_n(p, alphabets, N), S)))
print(output) | N = int(input())
S = input()
alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
def get_str_leading_n(string, alphabets, N):
index_ = (alphabets.index(string.upper()) + N) % 26
return alphabets[index_]
output = "".join(list(map(lambda p: get_str_leading_n(p, alphabets, N), S)))
print(output)
| [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 655,846 | 655,847 | u744683641 | python |
p02848 | N=int(input)
S=list(input())
ans=[]
for i in S:
if ord(i)+N>90:
temp=chr(ord(i)+N-26)
ans.append(temp)
else:
temp=chr(ord(i)+N)
ans.append(temp)
f=''.join(ans)
print(f) | N=int(input())
S=list(input())
ans=[]
for i in S:
if ord(i)+N>90:
temp=chr(ord(i)+N-26)
ans.append(temp)
else:
temp=chr(ord(i)+N)
ans.append(temp)
f=''.join(ans)
print(f) | [
"call.add"
] | 655,863 | 655,864 | u958973639 | python |
p02848 | def RotN():
N = int(input())
alfabet = input()
alfabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
count = []
chara = ""
for alfa in alfabet:
for i, alfa2 in enumerate(alfabet2):
if alfa2==alfa:
c = i+N
if c>=26:
c=c-26
chara+=alfabet2[c]
print(chara, c)
else:
chara+=alfabet2[c]
print(chara)
if __name__ == "__main__":
RotN() | def RotN():
N = int(input())
alfabet = input()
alfabet2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
count = []
chara = ""
for alfa in alfabet:
for i, alfa2 in enumerate(alfabet2):
if alfa2==alfa:
c = i+N
if c>=26:
c=c-26
chara+=alfabet2[c]
else:
chara+=alfabet2[c]
print(chara)
if __name__ == "__main__":
RotN() | [
"call.remove"
] | 655,869 | 655,870 | u784273630 | python |
p02848 | N = int(input())
S = str(input())
alphabet = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'N', 'M', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
return_word = []
for i in range(len(S)):
num = alphabet.index(S[i])
return_num = N + num
if return_num > 25:
return_num = return_num - 26
return_alphabet = alphabet[return_num]
return_word.append(return_alphabet)
final = ''
for alpha in return_word:
final += alpha
print(final) | N = int(input())
S = 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']
return_word = []
for i in range(len(S)):
num = alphabet.index(S[i])
return_num = N + num
if return_num > 25:
return_num = return_num - 26
return_alphabet = alphabet[return_num]
return_word.append(return_alphabet)
final = ''
for alpha in return_word:
final += alpha
print(final) | [
"literal.string.change",
"assignment.value.change"
] | 655,875 | 655,876 | u674736819 | python |
p02848 | N = int(input())
str = [input() for i in range(1)]
STRING=str[0]
enc = ""
for i in list(STRING):
ASCII = ord(i)
num = ASCII - 65
num = (num + N % 26)
ASCII = num + 65
if ASCII > 91:
ASCII -= 26
enc += chr(ASCII)
print(enc) | N = int(input())
str = [input() for i in range(1)]
STRING=str[0]
enc = ""
for i in list(STRING):
ASCII = ord(i)
num = ASCII - 65
num = (num + N % 26)
ASCII = num + 65
if ASCII > 90:
ASCII -= 26
enc += chr(ASCII)
print(enc) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 655,897 | 655,898 | u932368968 | python |
p02848 | n = int(input())
s = input()
S = [i for i in s]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i, value1 in enumerate(S):
for j, value2 in enumerate(a):
if value1 == value2:
if j+2 >= len(a):
S[i] = a[j+2-len(a)]
break
else:
S[i] = a[j+2]
break
S = "".join(S)
print(S) | n = int(input())
s = input()
S = [i for i in s]
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for i, value1 in enumerate(S):
for j, value2 in enumerate(a):
if value1 == value2:
if j+n >= len(a):
S[i] = a[j+n-len(a)]
break
else:
S[i] = a[j+n]
break
S = "".join(S)
print(S) | [
"identifier.replace.add",
"literal.replace.remove",
"control_flow.branch.if.condition.change",
"assignment.value.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 655,899 | 655,900 | u982944976 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.