Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02847
s = input() d = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRY', 'SAT'] print(7 - d.index(s))
s = input() d = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'] print(7 - d.index(s))
[ "literal.string.change", "assignment.value.change" ]
654,046
654,047
u319311571
python
p02847
n = (input()) day_of_week = { 'MON':1, 'TUE':2, 'WED':3, 'THU':4, 'FRI':5, 'SAT':6, 'SUN':7 } print(day_of_week[n])
n = (input()) day_of_week = { 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1, 'SUN':7 } print(day_of_week[n])
[ "literal.number.integer.change", "assignment.value.change" ]
654,053
654,054
u140191608
python
p02847
days_next_sunday = { 'SUN': 0, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 } print(days_next_sunday[input()])
days_next_sunday = { 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1 } print(days_next_sunday[input()])
[ "literal.number.integer.change", "assignment.value.change" ]
654,057
654,058
u717387812
python
p02847
s = input() arr = ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"] for i,t in enumerate(arr): if s == t: print(arr[i+1]) break
s = input() arr = ["SUN","MON","TUE","WED","THU","FRI","SAT","SUN"] for i,t in enumerate(arr): if s == t: print((7-i)) break
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
654,059
654,060
u078181689
python
p02847
S = input() if S == 'SUN': print(0) elif S == 'MON': print(6) elif S == 'TUE': print(5) elif S == 'WED': print(4) elif S == 'THU': print(3) elif S == 'FRI': print(2) else: print(1)
S = input() if S == 'SUN': print(7) elif S == 'MON': print(6) elif S == 'TUE': print(5) elif S == 'WED': print(4) elif S == 'THU': print(3) elif S == 'FRI': print(2) else: print(1)
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
654,065
654,066
u720124072
python
p02847
S = input() nextSunday = {'SUN':0, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1} print(nextSunday[S])
S = input() nextSunday = {'SUN':7, 'MON':6, 'TUE':5, 'WED':4, 'THU':3, 'FRI':2, 'SAT':1} print(nextSunday[S])
[ "literal.number.integer.change", "assignment.value.change" ]
654,067
654,068
u547728429
python
p02847
l = ["","MON","TUE","WED","THU","FRI","SAT","SUN"] s = input() a = l.index(s) print(7-a)
l = ["SUN","MON","TUE","WED","THU","FRI","SAT"] s = input() a = l.index(s) print(7-a)
[ "literal.string.change", "assignment.value.change" ]
654,079
654,080
u753589982
python
p02847
S = input() if S == "SUN": print("7") elif S == "MON": print("6") elif S == "TUS": print("5") elif S == "WED": print("4") elif S == "THU": print("3") elif S == "FRI": print("2") else: print("1")
S = input() if S == "SUN": print("7") elif S == "MON": print("6") elif S == "TUE": print("5") elif S == "WED": print("4") elif S == "THU": print("3") elif S == "FRI": print("2") else: print("1")
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,083
654,084
u313452574
python
p02847
def main(): a = {"SUN" : 0, "SAT" : 6, "FRI" : 5, "THI" : 4, "WED" : 3, "TUE" : 2, "MON" : 1} s = input() print(7-a[s]) main()
def main(): a = {"SUN" : 0, "SAT" : 6, "FRI" : 5, "THU" : 4, "WED" : 3, "TUE" : 2, "MON" : 1} s = input() print(7-a[s.strip()]) main()
[ "literal.string.change", "assignment.value.change", "call.add" ]
654,087
654,088
u243893927
python
p02847
S=input() w_dict = {'SUN':0,'MON':1,'TUE':2,'WED':3,'THU':4,'FRI':5,'SAT':6} print(w_dict[S]%7)
S=input() w_dict = {'SUN':0,'MON':1,'TUE':2,'WED':3,'THU':4,'FRI':5,'SAT':6} print(7 - w_dict[S])
[ "expression.operation.binary.remove" ]
654,089
654,090
u994034374
python
p02847
S = input() week_list = ["SUN", "MON", "TUE", "WED", "THE", "FRI", "SAT"] print(7 - week_list.index(S))
S = input() week_list = ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"] print(7 - week_list.index(S))
[ "literal.string.change", "assignment.value.change" ]
654,122
654,123
u255406953
python
p02847
s = input() weekdays = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'] idx = weekdays.index(s) ans = (idx + 1) % len(weekdays) print(weekdays[ans])
s = input() weekdays = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'] idx = weekdays.index(s) ans = 7 - (idx + 1) % len(weekdays) print(ans)
[ "call.arguments.change" ]
654,128
654,129
u395620499
python
p02847
a = input() b = 0 if a == 'SAT': b=6 elif a=='MON': b=1 elif a=='TUE': b=2 elif a=='WED': b=3 elif a=='THU': b=4 elif a=='FRI': b=5 else : b=7 print(b)
a = input() b = 0 if a == 'SAT': b=1 elif a=='MON': b=6 elif a=='TUE': b=5 elif a=='WED': b=4 elif a=='THU': b=3 elif a=='FRI': b=2 else : b=7 print(b)
[ "literal.number.integer.change", "assignment.value.change" ]
654,130
654,131
u079005857
python
p02847
wd = {'SUN' : 0, "SAT": 1, "FRI": 2, "THU": 3, "WED": 4, "TUE": 5, "MON": 6} S = input() print(wd[S])
wd = {'SUN' : 7, "SAT": 1, "FRI": 2, "THU": 3, "WED": 4, "TUE": 5, "MON": 6} S = input() print(wd[S])
[ "literal.number.integer.change", "assignment.value.change" ]
654,137
654,138
u691274427
python
p02847
S = input() if S == 'SUN': ans = 7 elif S == 'MON': ans = 6 elif S == 'TUE': ans == 5 elif S == 'WED': ans = 4 elif S == 'THU': ans = 3 elif S == 'FRI': ans = 2 elif S == 'SAT': ans = 1 print(ans)
S = input() if S == 'SUN': ans = 7 elif S == 'MON': ans = 6 elif S == 'TUE': ans = 5 elif S == 'WED': ans = 4 elif S == 'THU': ans = 3 elif S == 'FRI': ans = 2 elif S == 'SAT': ans = 1 print(ans)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
654,139
654,140
u305885563
python
p02847
import sys input = sys.stdin.readline s = input() if s == "SUN\n": print("7") elif s == "MON\n": print("6") elif s == "TUR\n": print("5") elif s == "WED\n": print("4") elif s == "THU\n": print("3") elif s == "FRI\n": print("2") elif s == "SAT\n": print("1")
import sys input = sys.stdin.readline s = input() if s == "SUN\n": print("7") elif s == "MON\n": print("6") elif s == "TUE\n": print("5") elif s == "WED\n": print("4") elif s == "THU\n": print("3") elif s == "FRI\n": print("2") elif s == "SAT\n": print("1")
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,141
654,142
u856965888
python
p02847
S=input() S=str(S) W=['SUN','MON','TUE','WED','THU','FRI','SAT'] for i,j in enumerate(W): if j==W: print(7-i)
S=input() S=str(S) W=['SUN','MON','TUE','WED','THU','FRI','SAT'] for i,j in enumerate(W): if j==S: print(7-i)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
654,149
654,150
u338193317
python
p02847
S = input() ans = ( 7 if S == "SUN" else 6 if S == "MON" else 5 if S == "TUE" else 4 if S == "WED" else 3 if S == "TRU" else 2 if S == "FRI" else 1 ) print(ans)
S = input() ans = ( 7 if S == "SUN" else 6 if S == "MON" else 5 if S == "TUE" else 4 if S == "WED" else 3 if S == "THU" else 2 if S == "FRI" else 1 ) print(ans)
[ "literal.string.change", "assignment.value.change" ]
654,153
654,154
u564902833
python
p02847
day == input() if(day=="SUN"): print(7) elif(day=="MON"): print(6) elif(day=="TUE"): print(5) elif(day=="WEN"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
day = input() if(day=="SUN"): print(7) elif(day=="MON"): print(6) elif(day=="TUE"): print(5) elif(day=="WED"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo", "literal.string.change", "control_flow.branch.if.condition.change" ]
654,157
654,156
u310108817
python
p02847
day = input() if(day=="SUN"): print(0) elif(day=="MON"): print(6) elif(day=="TUE"): print(5) elif(day=="WED"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
day = input() if(day=="SUN"): print(7) elif(day=="MON"): print(6) elif(day=="TUE"): print(5) elif(day=="WED"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
654,158
654,156
u310108817
python
p02847
s=input() days={"SUN":0,"SAT":1,"FRI":2,"THU":3,"WED":4,"TUE":5,"MON":6} print(days[s])
s=input() days={"SUN":7,"SAT":1,"FRI":2,"THU":3,"WED":4,"TUE":5,"MON":6} print(days[s])
[ "literal.number.integer.change", "assignment.value.change" ]
654,159
654,160
u859773831
python
p02847
days = ['SUN', 'MON', 'TUE', 'WED', 'THU',' FRI', 'SAT'] S = input() print(7 - days.index(S))
days = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'] S = input() print(7 - days.index(S))
[ "literal.string.change", "assignment.value.change" ]
654,161
654,162
u803617136
python
p02847
day=input() if (day=="SUN"): print(0) elif (day=="MON"): print(6) elif (day=="TUE"): print(5) elif(day=="WED"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
day=input() if (day=="SUN"): print(7) elif (day=="MON"): print(6) elif (day=="TUE"): print(5) elif(day=="WED"): print(4) elif(day=="THU"): print(3) elif(day=="FRI"): print(2) elif(day=="SAT"): print(1)
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
654,173
654,174
u490489966
python
p02847
a=input() s=['x','SAT','FRY','THU','WED','TUE','MON','SUN'] print(s.index(a))
a=input() s=['x','SAT','FRI','THU','WED','TUE','MON','SUN'] print(s.index(a))
[ "literal.string.change", "assignment.value.change" ]
654,193
654,194
u970899068
python
p02847
# coding:utf-8 daydic = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 3, 'SAT': 1} S = input() print(daydic[S])
# coding:utf-8 daydic = {'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1} S = input() print(daydic[S])
[ "literal.number.integer.change", "assignment.value.change" ]
654,204
654,205
u753342110
python
p02847
s=input() day=['SUN','MON','TUE','WED','THU','FRI','SAT'] print(day.index(s)+2)
s=input() day=['SUN','MON','TUE','WED','THU','FRI','SAT'] print(7-day.index(s))
[ "expression.operation.binary.remove" ]
654,214
654,215
u234582237
python
p02847
s=input() day=['SUN','MON','TUE','WED','THU','FRI','SAT'] print(day.index(s)+1)
s=input() day=['SUN','MON','TUE','WED','THU','FRI','SAT'] print(7-day.index(s))
[ "expression.operation.binary.remove" ]
654,216
654,215
u234582237
python
p02847
arr = ['NONE', 'SAT', ' FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN'] s = input() print(arr.index(s))
arr = ['NONE', 'SAT', 'FRI', 'THU', 'WED', 'TUE', 'MON', 'SUN'] s = input() print(arr.index(s))
[ "literal.string.change", "assignment.value.change" ]
654,229
654,230
u982594421
python
p02847
y=input() # s=[[0 for i in range(m)] for j in range(n)] # for i in range(n): # s[i]=list(input()) # SUN,MON,TUE,WED,THU,FRI,SAT if y=='SUN': print(7) elif y=='MON': print(6) elif y=='MON': print(5) elif y=='MON': print(4) elif y=='MON': print(3) elif y=='MON': print(2) elif y=='MON': print(1)
y=input() # s=[[0 for i in range(m)] for j in range(n)] # for i in range(n): # s[i]=list(input()) # SUN,MON,TUE,WED,THU,FRI,SAT if y=='SUN': print(7) elif y=='MON': print(6) elif y=='TUE': print(5) elif y=='WED': print(4) elif y=='THU': print(3) elif y=='FRI': print(2) elif y=='SAT': print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,255
654,256
u633320358
python
p02847
s = str(input()) ans = 0 if s=='SUN': ans = 7 elif s=='MON': ans = 6 elif s=='TUE': ans = 5 elif s=='WEN': ans = 4 elif s=='THU': ans = 3 elif s=='FRI': ans = 2 elif s=='SAT': ans = 1 print(ans)
s = str(input()) ans = 0 if s=='SUN': ans = 7 elif s=='MON': ans = 6 elif s=='TUE': ans = 5 elif s=='WED': ans = 4 elif s=='THU': ans = 3 elif s=='FRI': ans = 2 elif s=='SAT': ans = 1 print(ans)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,267
654,268
u527616458
python
p02847
s = input('') a = ['SUN','MON','TUE','WED','THE','FRI','SAT'] for i in range(7): if i != 6 and s == a[i]: print(int(7-i)) break elif i == 6: print(1)
s = input('') a = ['SUN','MON','TUE','WED','THU','FRI','SAT'] for i in range(7): if i != 6 and s == a[i]: print(int(7-i)) break elif i == 6: print(1)
[ "literal.string.change", "assignment.value.change" ]
654,269
654,270
u991269553
python
p02847
S = input() if S == 'SUN': print("0") 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")
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")
[ "literal.string.change", "call.arguments.change", "io.output.change" ]
654,275
654,276
u641804918
python
p02847
if S=="SUN": print(7) elif S=="MON": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="THU": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1)
S=input() if S=="SUN": print(7) elif S=="MON": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="THU": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1)
[ "assignment.add" ]
654,279
654,280
u051684204
python
p02847
S=input() if S=="SUN": print(7) elif S=="MON": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="TUE": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1)
S=input() if S=="SUN": print(7) elif S=="MON": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="THU": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,281
654,280
u051684204
python
p02847
S=input() if S=="Mon": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="THU": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1) elif S=="SUN": print(7)
S=input() if S=="MON": print(6) elif S=="TUE": print(5) elif S=="WED": print(4) elif S=="THU": print(3) elif S=="FRI": print(2) elif S=="SAT": print(1) elif S=="SUN": print(7)
[ "literal.string.change", "literal.string.case.change", "control_flow.branch.if.condition.change" ]
654,286
654,287
u938892722
python
p02847
S = input() if(S=='SUN'): print(7) elif(S=='MON'): print(6) elif(S=='TUE'): print(5) elif(S=='WED'): print(4) elif(S=='THR'): print(3) elif(S=='FRI'): print(2) elif(S=='SAT'): print(1)
S = input() if(S=='SUN'): print(7) elif(S=='MON'): print(6) elif(S=='TUE'): print(5) elif(S=='WED'): print(4) elif(S=='THU'): print(3) elif(S=='FRI'): print(2) elif(S=='SAT'): print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,296
654,297
u492929439
python
p02847
S = input() mydict = {"SUN":0, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1} O = mydict[S] print(O)
S = input() mydict = {"SUN":7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1} O = mydict[S] print(O)
[ "literal.number.integer.change", "assignment.value.change" ]
654,298
654,299
u980452957
python
p02847
print((7 - ["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input())) % 7)
print((7 - ["SUN","MON","TUE","WED","THU","FRI","SAT"].index(input())))
[ "expression.operation.binary.remove" ]
654,300
654,301
u653807637
python
p02847
a = input() if a == 'SUN': print(7) elif a == 'MON': print(6) elif a == 'TUE': print(5) elif a == 'WED': print(4) elif a == 'THU': print(3) elif a == 'FRY': print(2) elif a == 'SAT': print(1)
a = input() if a == 'SUN': print(7) elif a == 'MON': print(6) elif a == 'TUE': print(5) elif a == 'WED': print(4) elif a == 'THU': print(3) elif a == 'FRI': print(2) elif a == 'SAT': print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,304
654,305
u365013885
python
p02847
a = input() if a == 'SUN': print(7) elif a == 'MON': print(6) elif a == 'TUE': print(5) elif a == 'WED': print(4) elif a == 'THU': print(3) elif a == 'FRY': print(2) elif a == 'SAT': print(1) else: pass
a = input() if a == 'SUN': print(7) elif a == 'MON': print(6) elif a == 'TUE': print(5) elif a == 'WED': print(4) elif a == 'THU': print(3) elif a == 'FRI': print(2) elif a == 'SAT': print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,306
654,305
u365013885
python
p02847
S = "SUN" if S == ("SUN"): print(7) elif S == ("MON"): print(6) elif S == ("TUE"): print(5) elif S == ("WED"): print(4) elif S == ("THU"): print(3) elif S == ("FRI"): print(2) elif S == ("SAT"): print(1)
S = input() if S == ("SUN"): print(7) elif S == ("MON"): print(6) elif S == ("TUE"): print(5) elif S == ("WED"): print(4) elif S == ("THU"): print(3) elif S == ("FRI"): print(2) elif S == ("SAT"): print(1)
[]
654,311
654,312
u609814378
python
p02847
S = input() if S == ("SUN"): pritn(7) elif S == ("MON"): print(6) elif S == ("TUE"): print(5) elif S == ("WED"): print(4) elif S == ("THU"): print(3) elif S == ("FRI"): print(2) elif S == ("SAT"): print(1)
S = input() if S == ("SUN"): print(7) elif S == ("MON"): print(6) elif S == ("TUE"): print(5) elif S == ("WED"): print(4) elif S == ("THU"): print(3) elif S == ("FRI"): print(2) elif S == ("SAT"): print(1)
[ "identifier.change", "call.function.change" ]
654,313
654,312
u609814378
python
p02847
S=input() if S=="SUN": print(7) elif S=="MON" : print(6) elif S=="TUE" : print(5) elif S=="WEN" : print(4) elif S=="THU" : print(3) elif S=="FRI" : print(2) else: print(1)
S=input() if S=="SUN": print(7) elif S=="MON" : print(6) elif S=="TUE" : print(5) elif S=="WED" : print(4) elif S=="THU" : print(3) elif S=="FRI" : print(2) else: print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,325
654,326
u922769680
python
p02847
s=input() if s=="SUN": print(7) elif s=="MON": print(6) elif s=="TUE": pirnt(5) elif s=="WED": print(4) elif s=="THU": print(3) elif s=="FRI": print(2) else: print(1)
s=input() if s=="SUN": print(7) elif s=="MON": print(6) elif s=="TUE": print(5) elif s=="WED": print(4) elif s=="THU": print(3) elif s=="FRI": print(2) else: print(1)
[ "identifier.change", "call.function.change" ]
654,336
654,337
u895788460
python
p02847
s = input() if s == 'MAN': 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) if s == 'SUN': print(7)
s = input() 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) if s == 'SUN': print(7)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,342
654,343
u148551245
python
p02847
N = input() day_d = {\ "SUN":7, "MAN":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1 } print(day_d[N])
N = input() day_d = {\ "SUN":7, "MON":6, "TUE":5, "WED":4, "THU":3, "FRI":2, "SAT":1 } print(day_d[N])
[ "literal.string.change", "assignment.value.change" ]
654,362
654,363
u323125813
python
p02847
arr = ['SAT','FRI','TUR','WED','TUE', 'MON','SUN'] s = input() print(arr.index(s) + 1)
arr = ['SAT','FRI','THU','WED','TUE', 'MON','SUN'] s = input() print(arr.index(s) + 1)
[ "literal.string.change", "assignment.value.change" ]
654,366
654,367
u550943777
python
p02847
S = input() print({ 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1, })
S = input() print({ 'SUN': 7, 'MON': 6, 'TUE': 5, 'WED': 4, 'THU': 3, 'FRI': 2, 'SAT': 1, }[S])
[]
654,374
654,375
u045939752
python
p02847
S = input() if S == "SAT": res = "1" elif S == "SUN": res = "7" elif S == "MON": res = "6" elif S == "TUE": res = "5" elif S == "WED": res = "4" elif S == "THU": res = "3" elif S == "Fri": res = "2" print(res)
S = input() if S == "SAT": res = "1" elif S == "SUN": res = "7" elif S == "MON": res = "6" elif S == "TUE": res = "5" elif S == "WED": res = "4" elif S == "THU": res = "3" elif S == "FRI": res = "2" print(res)
[ "literal.string.change", "literal.string.case.change", "control_flow.branch.if.condition.change" ]
654,376
654,377
u724428568
python
p02847
l={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1} print(s[input()])
l={"SUN":7,"MON":6,"TUE":5,"WED":4,"THU":3,"FRI":2,"SAT":1} print(l[input()])
[ "identifier.change", "call.arguments.change", "io.output.change" ]
654,395
654,396
u422104747
python
p02847
a=input() if a in "SAT": print(1) if a in "SUN": print(7) if a in "MON": print(6) if a in "TUE": print(5) if a in "WED": print(4) if a in "THU": print(3) if a in "SAT": print(2)
a=input() if a in "SAT": print(1) if a in "SUN": print(7) if a in "MON": print(6) if a in "TUE": print(5) if a in "WED": print(4) if a in "THU": print(3) if a in "FRI": print(2)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,405
654,406
u375695365
python
p02847
a=input() if a in "SAT": print(1) if a in "SUN": print(7) if a in "MAN": print(6) if a in "TUE": print(5) if a in "WED": print(4) if a in "THU": print(3) if a in "SAT": print(2)
a=input() if a in "SAT": print(1) if a in "SUN": print(7) if a in "MON": print(6) if a in "TUE": print(5) if a in "WED": print(4) if a in "THU": print(3) if a in "FRI": print(2)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,407
654,406
u375695365
python
p02847
S = input() if S == 'SUN': print(7) elif S == 'MON': print(6) elif S == 'TUE': print(5) elif S == 'WED': print(4) elif S == 'THU': print(3) elif S == 'FRI': print(2) elif S == 'SUT': print(1)
S = input() if S == 'SUN': print(7) elif S == 'MON': print(6) elif S == 'TUE': print(5) elif S == 'WED': print(4) elif S == 'THU': print(3) elif S == 'FRI': print(2) elif S == 'SAT': print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,424
654,425
u058880764
python
p02847
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"] S = input() print(7 - index(S))
s = ["SUN","MON","TUE","WED","THU","FRI","SAT"] S = input() print(7 - s.index(S))
[]
654,430
654,431
u942033906
python
p02847
# -*- 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(): A=S() if A=="SUN": print(7) elif A=="MON": print(6) elif A=="TUE": print(5) elif A=="MWED": print(4) elif A=="THU": print(3) elif A=="FRI": print(2) elif A=="SAT": print(1) 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(): A=S() if A=="SUN": print(7) elif A=="MON": print(6) elif A=="TUE": print(5) elif A=="WED": print(4) elif A=="THU": print(3) elif A=="FRI": print(2) elif A=="SAT": print(1) if __name__ == "__main__": main()
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,432
654,433
u558699902
python
p02847
day = input() if day == "SUN": print(7) elif day == "MON": print(6) elif day == "TUE": print(5) elif day == "WED": print(4) elif day == "TFU": print(3) elif day == "FRI": print(2) else: print(1)
day = input() if day == "SUN": print(7) elif day == "MON": print(6) elif day == "TUE": print(5) elif day == "WED": print(4) elif day == "THU": print(3) elif day == "FRI": print(2) else: print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,452
654,453
u107269063
python
p02847
s = int(input()) if s == 'SAT': print(1) if s == 'FRI': print(2) if s == 'THU': print(3) if s == 'WED': print(4) if s == 'TUE': print(5) if s == 'MON': print(6) if s == 'SUN': print(7)
s = input() if s == 'SAT': print(1) if s == 'FRI': print(2) if s == 'THU': print(3) if s == 'WED': print(4) if s == 'TUE': print(5) if s == 'MON': print(6) if s == 'SUN': print(7)
[ "call.remove", "call.arguments.change" ]
654,466
654,467
u802341442
python
p02847
S = input() if S == "SUN": print(7) elif S == "MON": print(6) elif S == "TUE": print(5) elif S == "WED": print(4) elif S ==" THU": print(3) elif S == "FRI": print(2) else: print(1)
S = input() if S == "SUN": print(7) elif S == "MON": print(6) elif S == "TUE": print(5) elif S == "WED": print(4) elif S == "THU": print(3) elif S == "FRI": print(2) else: print(1)
[ "literal.string.change", "control_flow.branch.if.condition.change" ]
654,505
654,506
u385244248
python
p02848
N=int(input()) S=input() s=[] for i in S: T=ord(i) - ord('A') + 1+N+64 if T<=90: t=T else: t=T-26 s.append(chr(t)) print(*s)
N=int(input()) S=input() s=[] for i in S: T=ord(i) - ord('A') + 1+N+64 if T<=90: t=T else: t=T-26 s.append(chr(t)) print(*s,sep='')
[ "call.arguments.add" ]
654,515
654,516
u434966508
python
p02848
n = int(input()) s = input() q = [chr(i) for i in range(65,65+26)] ans = [] for i in s: al = q.index(i) if al + n >= 26: al -= 26 print(q[al],end='')
n = int(input()) s = input() q = [chr(i) for i in range(65,65+26)] ans = [] for i in s: al = q.index(i) al += n if al >= 26: al -= 26 print(q[al],end='')
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
654,534
654,535
u773440446
python
p02848
# ABC146 B - ROT N N = int(input()) S = str(input()) s='' alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] for i in range(len(S)): t =alp.index(S[i])+N if t>=26: t -=26 s += alp[t]
# ABC146 B - ROT N N = int(input()) S = str(input()) s='' alp = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] for i in range(len(S)): t =alp.index(S[i])+N if t>=26: t -=26 s += alp[t] print(s)
[ "call.add" ]
654,536
654,537
u433380437
python
p02848
N = int(input()) S = input() alpha = "ABCDEFGHIJKLNMOPQRSTUVWXYZABCDEFGHIJKLNMOPQRSTUVWXYZ" result = "" for s in S: i = alpha.index(s) result += alpha[i+N] print(result)
N = int(input()) S = input() alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" result = "" for s in S: i = alpha.index(s) result += alpha[i+N] print(result)
[ "literal.string.change", "assignment.value.change" ]
654,540
654,541
u698868214
python
p02848
N = int(input()) S = input() s = list(S) for i in range(len(S)): if (ord(s[i]) - 64 + N) == 26: p = 89 else: p = (ord(s[i]) - 64 + N) % 26 + 64 s[i] = chr(p) print("".join(s))
N = int(input()) S = input() s = list(S) for i in range(len(S)): if (ord(s[i]) - 64 + N) % 26 == 0: p = 90 else: p = (ord(s[i]) - 64 + N) % 26 + 64 s[i] = chr(p) print("".join(s))
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "literal.number.integer.change", "assignment.value.change" ]
654,544
654,543
u967822229
python
p02848
N = int(input()) S = input() s = list(S) for i in range(len(S)): if (ord(s[i]) - 64 + N) % 26 == 26: p = 89 else: p = (ord(s[i]) - 64 + N) % 26 + 64 s[i] = chr(p) print("".join(s))
N = int(input()) S = input() s = list(S) for i in range(len(S)): if (ord(s[i]) - 64 + N) % 26 == 0: p = 90 else: p = (ord(s[i]) - 64 + N) % 26 + 64 s[i] = chr(p) print("".join(s))
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "assignment.value.change" ]
654,545
654,543
u967822229
python
p02848
N=int(input()) S=input() tmp="" for i in range(len(S)): chtmp=ord(S[i])+N if(chtmp>ord('Z')): chtmp-=(ord('Z') - ord('A')) tmp+=chr(chtmp) print(tmp)
N=int(input()) S=input() tmp="" for i in range(len(S)): chtmp=ord(S[i])+N if(chtmp>ord('Z')): chtmp-=(ord('Z') - ord('A') + 1) tmp+=chr(chtmp) print(tmp)
[ "expression.operation.binary.add" ]
654,550
654,551
u457460736
python
p02848
N = int(input()) S = list(input()) for i in range(len(S)): if ord(S[i])+2 <= 90: S[i] = chr(ord(S[i])+N) else: S[i] = chr(ord(S[i])+N-26) for j in S: print(j,end = "")
N = int(input()) S = list(input()) for i in range(len(S)): if ord(S[i])+N <= 90: S[i] = chr(ord(S[i])+N) else: S[i] = chr(ord(S[i])+N-26) for j in S: print(j,end = "")
[ "identifier.replace.add", "literal.replace.remove", "control_flow.branch.if.condition.change" ]
654,554
654,555
u131464432
python
p02848
n=int(input()) s=input() ans="" for i in range(len(s)): tmp=ord(s[i])+2 if tmp>90: tmp-=26 ans+=chr(tmp) print(ans)
n=int(input()) s=input() ans="" for i in range(len(s)): tmp=ord(s[i])+n if tmp>90: tmp-=26 ans+=chr(tmp) print(ans)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
654,560
654,561
u587589241
python
p02848
alphabet = list("ABCDEFGHRJKLMNOPQRSTUVWXYZ") n = int(input()) s = input() for i in s: #print(i, alphabet.index(i)) print(alphabet[(alphabet.index(i)+n) % 26], end='')
alphabet = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") N = int(input()) S = input() for i in S: print(alphabet[(alphabet.index(i)+N) % 26], end='')
[ "literal.string.change", "assignment.value.change", "call.arguments.change", "assignment.variable.change", "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change", "io.output.change" ]
654,562
654,563
u507145838
python
p02848
def main(): n = int(input()) s = input() ans = "" for i in range(len(s)): suuji = ord(s[i]) tsugi = suuji + n if tsugi > 97+25: tsugi -= 26 ans += chr(tsugi) print(ans) if __name__ == "__main__": main()
def main(): n = int(input()) s = input() ans = "" for i in range(len(s)): suuji = ord(s[i]) tsugi = suuji + n if tsugi > 65+25: tsugi -= 26 ans += chr(tsugi) print(ans) if __name__ == "__main__": main()
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
654,568
654,569
u670961163
python
p02848
N = int(input()) S = input() alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' new_S = list() for word in S: num = alpha.index(word)+N if num > 25: num -= 25 new_S.append(alpha[num]) print(''.join(new_S))
N = int(input()) S = input() alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' new_S = list() for word in S: num = alpha.index(word)+N if num > 25: num -= 26 new_S.append(alpha[num]) print(''.join(new_S))
[ "literal.number.integer.change" ]
654,574
654,575
u375193358
python
p02848
n=int(input()) s=input() t='' for i in s: x=chr((ord(i)-65)%26+65-n) t+=x print(t)
n=int(input()) s=input() t='' for i in s: x=chr((ord(i)-65+n)%26+65) t+=x print(t)
[ "expression.operation.binary.remove" ]
654,576
654,577
u350093546
python
p02848
n=int(input()) s=input() t='' for i in s: x=chr((ord(i)-65)%26+65) t+=x print(t)
n=int(input()) s=input() t='' for i in s: x=chr((ord(i)-65+n)%26+65) t+=x print(t)
[ "assignment.change" ]
654,578
654,577
u350093546
python
p02848
N=int(input()) S=input() 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','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'] anslist=[] for i in range(len(S)): b=a.index(S[i]) ans.append(a[b+N]) ans="".join(anslist)
N=int(input()) S=input() 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','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'] anslist=[] for i in range(len(S)): b=a.index(S[i]) anslist.append(a[b+N]) ans="".join(anslist) print(ans)
[ "identifier.change", "call.add" ]
654,583
654,584
u674588203
python
p02848
arb='ABCDEFDHIJKLMNOPQRSTUVWXYZ' N = int(input()) S = input() ans ='' for i in range(len(S)): if arb.index(S[i]) + N +1 <= len(arb): ans += arb[arb.index(S[i])+N] else: ans += arb[-len(arb) + arb.index(S[i]) + N] print(ans)
arb='ABCDEFGHIJKLMNOPQRSTUVWXYZ' N = int(input()) S = input() ans ='' for i in range(len(S)): if arb.index(S[i]) + N +1 <= len(arb): ans += arb[arb.index(S[i])+N] else: ans += arb[-len(arb) + arb.index(S[i]) + N] print(ans)
[ "literal.string.change", "assignment.value.change" ]
654,585
654,586
u912650255
python
p02848
n=int(input()) s=input() hiee="" ans="" for i in range(len(s)): hiee=ord(s[i]) if (hiee+n >90): print("0") hiee-=26 ans+=chr(hiee+n) print(ans)
n=int(input()) s=input() hiee="" ans="" for i in range(len(s)): hiee=ord(s[i]) if (hiee+n >90): hiee-=26 ans+=chr(hiee+n) print(ans)
[ "call.remove" ]
654,600
654,601
u409254176
python
p02848
N=int(input()) S=input() alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ" ans='' for i in range(len(S)): ans=ans+alphabet[(alphabet.find(S[i])+N)%26]
N=int(input()) S=input() alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ" ans='' for i in range(len(S)): ans=ans+alphabet[(alphabet.find(S[i])+N)%26] print(ans)
[ "call.add" ]
654,603
654,604
u942051624
python
p02848
n=int(input()) s=input() a="" for i in s: a+=chr(65+(ord(i)+n)%26) print(a)
n=int(input()) s=input() a="" for i in s: a+=chr(65+(ord(i)+n-65)%26) print(a)
[ "expression.operation.binary.add" ]
654,605
654,606
u344065503
python
p02848
n=int(input()) s=input() a="" for i in s: a+=chr(65+(ord(i)+n)%26) print(a)
n=int(input()) s=input() a="" for i in s: a+=chr(65+(ord(i)+n-65)%26) print(a)
[ "expression.operation.binary.add" ]
654,607
654,606
u344065503
python
p02848
n=int(input()) s=input() t=[] for i in range(len(s)): num=ord(s[i])+n if num>122: num-=26 t.append(chr(num)) print("".join(t))
n=int(input()) s=input() t=[] for i in range(len(s)): num=ord(s[i])+n if num>90: num-=26 t.append(chr(num)) print("".join(t))
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
654,610
654,611
u920103253
python
p02848
n = int(input()) s = input() S="" for i in range(len(s)): print(chr((ord(s[i])+n-65)%26+65))
n = int(input()) s = input() S="" for i in range(len(s)): S+=chr((ord(s[i])+n-65)%26+65) print(S)
[ "call.add" ]
654,620
654,621
u640603056
python
p02848
n = int(input()) s = input() l = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') * 2 a = '' for i in s: a += l[l.index(i) + n] pritn(a)
n = int(input()) s = input() l = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') * 2 a = '' for i in s: a += l[l.index(i) + n] print(a)
[ "identifier.change", "call.function.change" ]
654,622
654,623
u313291636
python
p02848
# B - ROT N # https://atcoder.jp/contests/abc146/tasks/abc146_b N = int(input()) S = input() tmp = "" for s in S: unicode_point = ord(s) + N if unicode_point >= 90: unicode_point = 65 + (unicode_point - 90) tmp += chr(unicode_point) print(tmp)
# B - ROT N # https://atcoder.jp/contests/abc146/tasks/abc146_b N = int(input()) S = input() tmp = "" for s in S: unicode_point = ord(s) + N if unicode_point > 90: unicode_point = 64 + (unicode_point - 90) tmp += chr(unicode_point) print(tmp)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
654,624
654,625
u189089176
python
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#こっちの方が入力が早いが使える時に使っていこう from operator import mul from functools import reduce from collections import Counter #from collections import deque #input = stdin.readline j=0 k=0 n=3 r=1 a=[0] #n=int(input()) #r=int(input()) #print(M) #A=int(input()) #B=int(input()) #print(N) "1行1つの整数を入力を取得し、整数と取得する" #number_list=list(map(int, input().split(" ")))#数字の時 #print(number_list) "12 21 332 とか入力する時に使う" "1行に複数の整数の入力を取得し、整数として扱う" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' #メモ for i in number_list:#こっちの方がrage使うより早いらしい print(number_list[i-1])# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''' x=[] y=[] for i in range(N): x1, y1=[int(i) for i in input().split()] x.append(x1) y.append(y1) print(x) print(y) "複数行に2数値を入力する形式 x座標とy座標を入力するイメージ" ''' ''' mixlist=[] for i in range(N): a,b=input().split() mixlist.append((int(a),b)) print(mixlist) "複数行にintとstrを複合して入力するやつ,今回はリスト一つで処理している" ''' ''' #array=[input().split()for i in range(N)] #print(type(array[0][0])) #print(array) "正方行列にstr型の値を入力" ''' #brray=[list(map(int, input().split(" ")))for i in range(N)] #print(type(brray[0][0])) #print(brray) ''' 入力 1 2 4 5 7 8 出力結果 [[1, 2], [4, 5], [7, 8]] ''' "列数に関して自由度の高いint型の値を入力するタイプの行列" #以下に別解を記載 #N, M = [int(i) for i in input().split()] ''' table = [[int(i) for i in input().split()] for m in range(m)] print(type(N)) print(N) print(type(M)) print(M) print(type(table)) print(table) ''' #s=input() #a=[int(i) for i in s] #print(a[0]) #print([a]) #単数値.桁ごとに分割したい.入力と出力は以下の通り #イメージとして1桁ごとにリストに値を入れているかんじ #intを取ると文字列分解に使える ''' 入力 1234 出力 1 [[1, 2, 3, 4]] ''' ''' word_list= input().split(" ") print(word_list[0]) "連続文字列の入力" "qw er ty とかの入力に使う" "入力すると空白で区切ったところでlistの番号が与えられる" ''' ''' A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い print(A) "リストではなく独立したstr型を入れるなら以下のやり方でOK" ''' #a= stdin.readline().rstrip() #print(a.upper()) "aという変数に入っているものを大文字にして出力" #a,b=map(int, input().split()) #int style 複数数値入力 「A B」みたいなスペース空いた入力のとき #なんかうまく入力されるけど #a=[[int(i) for i in 1.strip()]for 1 in sys.stdin] #a = [[int(c) for c in l.strip()] for l in sys.stdin]] #print(a) #複数行の数値を入力して正方行列を作成 ############################################################################################## ############################################################################################## #under this line explains example calculation ''' コンビネーションの組み合わせの中身を出力する形式 for i in itertools.combinations(brray, 2) combinationsをpermutationsにすれば順列になる 今回なら(abc133B) 入力 1 2 5 5 -2 8 出力 [[1, 2], [5, 5], [-2, 8]] もちろん一次元リストでも使えるし 何よりiもリストのように使えるので便利 ''' #nCr combination ''' def cmb(n,r): #When n < r , this function isn't valid r= min(n-r,r) #print(n,r) if r == 0: return 1 over = reduce(mul, range(n, n-r, -1)) #flochart mul(n,n-1)=x #next mul(x,n-2)........(n-r+1,n-r) #mul read a,b and returns a*b under = reduce(mul, range(1, r+1)) #print(over, under) #reduce is applied mul(1,2)=2 #next mul(2,3)=6 #next mul(6,4)=4.........last(r!,r+1)=r+1! return over // under #// is integer divide #calc example 5C2 #over=5*4*3 #under=3*2*1 a = cmb(n, r) #print(a) ''' ''' import itertools from itertools import combinations_with_replacement combinationについて 以下の違いを意識しよう combinations() p, r 長さrのタプル列、ソートされた順で重複なし combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり 使用例             出力   combinations('ABCD', 2)            AB AC AD BC BD CD combinations_with_replacement('ABCD', 2)   AA AB AC AD BB BC BD CC CD DD ''' ''' #集計 #example #a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1] #a=Counter(a) for i in a.most_common(n):print(i) #most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。 #引数にint型の数字nを設定した場合は、出現回数が高い上位n個の要素を返します。 #何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。 #out put #(2, 8) #(1, 6) #(3, 3) #(4, 1) ''' #二部探索(binary search) #A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6] #print(A) #index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている #A.insert(index, 5) #print(index) #print(A) ''' bisect.bisect_left(a, x, lo=0, h=len(a)) 引数 a: ソート済みリスト x: 挿入したい値 lo: 探索範囲の下限 hi: 探索範囲の上限 (lo, hiはスライスと同様の指定方法) bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。 ''' ''' 素数の判定 ''' def is_prime(n): if n == 1: return False for k in range(2, int(np.sqrt(n)) + 1): #sqrt(n)+1以上は考えて約数はないので却下 if n % k == 0: return False #割り切れたらFalse return True ''' npのmaxとmaximumの違い xs = np.array([1, -2, 3]) np.max(xs, 0) この出力は3となります.[1, -2, 3]と0の4つの数字のうち,最も大きい値を出力します. 一方で,[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります. その時は,numpyのmaximum関数を用います. xs = np.array([1, -2, 3]) np.maximum(xs, 0) # [1, 0, 3] ''' def factorial(x, mod=10**9+7): # x! # 階乗 # ex) factorial(5) = 120 tmp = 1 for i in range(1, x+1): tmp = (tmp * i) % mod return tmp ''' Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large. But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does. ''' ######################################################################## ######################################################################## #b2=a[:] #1次元のときはコピーはこれで良い #print(b2) #a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ #b3=copy.deepcopy(a) #2次元配列はこうコピーする #print(b3) def main(): n=3 steps=0 state=0 w=1 j=0 k=0 n=int(input()) s=input() ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' #a,b=input().split(" ")#a,bがともに文字列のとき #a,b=map(int, input().split(" ")) #mapでとってもstrで変換すればappend可能 #nl=list(map(int, input().split(" ")))#数字の時 #s=input() a=[i for i in ascii_uppercase]#int取るとstrでも行ける b=[i for i in s]#int取るとstrでも行ける c=[] a.insert(0, 'AAAAA') #print(a) for i in range(len(b)): x=a.index(b[i]) c.append(a[(x+n)%26]) print(''.join(c)) #print(a) #brray=[list(map(int, input().split(" ")))for i in range(N) #print(brray) for i in range(1,n+1,2):#これで1個飛ばしループになる pass #print(i) l = ['aaa', 'bbb', 'ccc'] #s = ''.join(l) #print(s) # aaabbbccc #if state in known_states and not flag: # state => 2 steps => 5 #こうやってある要素がリストの中にあるか探すのか #print(f'steps: {steps}, state: {state}') #こう書いてあるとデバックしやすい #dp= [[0]*3 for i in range(5)]#列 行 #dp用の0の入ったやつ #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから #print(dp)#初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数) DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる exdp=np.zeros((3,4)) # 3×4の2次元配列を生成。2次元ならこう #dtypeは指定しないとfloatになる #for i in range(n):#ちょっとした入力に便利 # a, b = map(int, input().split()) #dp[i][0] += [a] #これだとintとlistをつなぐことになって不適 # dp[i] += [a] # dp[i] += [b] #これはうまくいく #やり方はいろいろあるということ #print(dp) #brray=[list(map(int, input().split(" ")))for i in range(N) #print(brray) ''' 入力 1234 出力 [1, 2, 3, 4] ''' pin_l=["x" for i in range(10)]#内包表記に慣れろ #print(pin_l) ls = ["a", "b", "c", "d", "e"] #print(ls[2:5]) #スライスでの取得 #print(ls[:-3]) #一番左端から右から3番目より左まで取得 #print(ls[:4:2]) #スライスで1個飛ばしで取得 #ないときは左端スタート #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1 #print(ls[::2]) ''' lsというリストの場合に、1つ飛びの値を取得したい場合には ls[::2] のようにします。こうすると、 ["a", "c", "d"]と出力される ''' if __name__ == "__main__": main()
# -*- 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#こっちの方が入力が早いが使える時に使っていこう from operator import mul from functools import reduce from collections import Counter #from collections import deque #input = stdin.readline j=0 k=0 n=3 r=1 a=[0] #n=int(input()) #r=int(input()) #print(M) #A=int(input()) #B=int(input()) #print(N) "1行1つの整数を入力を取得し、整数と取得する" #number_list=list(map(int, input().split(" ")))#数字の時 #print(number_list) "12 21 332 とか入力する時に使う" "1行に複数の整数の入力を取得し、整数として扱う" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' #メモ for i in number_list:#こっちの方がrage使うより早いらしい print(number_list[i-1])# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''' x=[] y=[] for i in range(N): x1, y1=[int(i) for i in input().split()] x.append(x1) y.append(y1) print(x) print(y) "複数行に2数値を入力する形式 x座標とy座標を入力するイメージ" ''' ''' mixlist=[] for i in range(N): a,b=input().split() mixlist.append((int(a),b)) print(mixlist) "複数行にintとstrを複合して入力するやつ,今回はリスト一つで処理している" ''' ''' #array=[input().split()for i in range(N)] #print(type(array[0][0])) #print(array) "正方行列にstr型の値を入力" ''' #brray=[list(map(int, input().split(" ")))for i in range(N)] #print(type(brray[0][0])) #print(brray) ''' 入力 1 2 4 5 7 8 出力結果 [[1, 2], [4, 5], [7, 8]] ''' "列数に関して自由度の高いint型の値を入力するタイプの行列" #以下に別解を記載 #N, M = [int(i) for i in input().split()] ''' table = [[int(i) for i in input().split()] for m in range(m)] print(type(N)) print(N) print(type(M)) print(M) print(type(table)) print(table) ''' #s=input() #a=[int(i) for i in s] #print(a[0]) #print([a]) #単数値.桁ごとに分割したい.入力と出力は以下の通り #イメージとして1桁ごとにリストに値を入れているかんじ #intを取ると文字列分解に使える ''' 入力 1234 出力 1 [[1, 2, 3, 4]] ''' ''' word_list= input().split(" ") print(word_list[0]) "連続文字列の入力" "qw er ty とかの入力に使う" "入力すると空白で区切ったところでlistの番号が与えられる" ''' ''' A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い print(A) "リストではなく独立したstr型を入れるなら以下のやり方でOK" ''' #a= stdin.readline().rstrip() #print(a.upper()) "aという変数に入っているものを大文字にして出力" #a,b=map(int, input().split()) #int style 複数数値入力 「A B」みたいなスペース空いた入力のとき #なんかうまく入力されるけど #a=[[int(i) for i in 1.strip()]for 1 in sys.stdin] #a = [[int(c) for c in l.strip()] for l in sys.stdin]] #print(a) #複数行の数値を入力して正方行列を作成 ############################################################################################## ############################################################################################## #under this line explains example calculation ''' コンビネーションの組み合わせの中身を出力する形式 for i in itertools.combinations(brray, 2) combinationsをpermutationsにすれば順列になる 今回なら(abc133B) 入力 1 2 5 5 -2 8 出力 [[1, 2], [5, 5], [-2, 8]] もちろん一次元リストでも使えるし 何よりiもリストのように使えるので便利 ''' #nCr combination ''' def cmb(n,r): #When n < r , this function isn't valid r= min(n-r,r) #print(n,r) if r == 0: return 1 over = reduce(mul, range(n, n-r, -1)) #flochart mul(n,n-1)=x #next mul(x,n-2)........(n-r+1,n-r) #mul read a,b and returns a*b under = reduce(mul, range(1, r+1)) #print(over, under) #reduce is applied mul(1,2)=2 #next mul(2,3)=6 #next mul(6,4)=4.........last(r!,r+1)=r+1! return over // under #// is integer divide #calc example 5C2 #over=5*4*3 #under=3*2*1 a = cmb(n, r) #print(a) ''' ''' import itertools from itertools import combinations_with_replacement combinationについて 以下の違いを意識しよう combinations() p, r 長さrのタプル列、ソートされた順で重複なし combinations_with_replacement() p, r 長さrのタプル列、ソートされた順で重複あり 使用例             出力   combinations('ABCD', 2)            AB AC AD BC BD CD combinations_with_replacement('ABCD', 2)   AA AB AC AD BB BC BD CC CD DD ''' ''' #集計 #example #a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1] #a=Counter(a) for i in a.most_common(n):print(i) #most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。 #引数にint型の数字nを設定した場合は、出現回数が高い上位n個の要素を返します。 #何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。 #out put #(2, 8) #(1, 6) #(3, 3) #(4, 1) ''' #二部探索(binary search) #A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6] #print(A) #index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている #A.insert(index, 5) #print(index) #print(A) ''' bisect.bisect_left(a, x, lo=0, h=len(a)) 引数 a: ソート済みリスト x: 挿入したい値 lo: 探索範囲の下限 hi: 探索範囲の上限 (lo, hiはスライスと同様の指定方法) bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。 ''' ''' 素数の判定 ''' def is_prime(n): if n == 1: return False for k in range(2, int(np.sqrt(n)) + 1): #sqrt(n)+1以上は考えて約数はないので却下 if n % k == 0: return False #割り切れたらFalse return True ''' npのmaxとmaximumの違い xs = np.array([1, -2, 3]) np.max(xs, 0) この出力は3となります.[1, -2, 3]と0の4つの数字のうち,最も大きい値を出力します. 一方で,[max(1, 0), max(-2, 0), max(3, 0)]を出力したい時があります. その時は,numpyのmaximum関数を用います. xs = np.array([1, -2, 3]) np.maximum(xs, 0) # [1, 0, 3] ''' def factorial(x, mod=10**9+7): # x! # 階乗 # ex) factorial(5) = 120 tmp = 1 for i in range(1, x+1): tmp = (tmp * i) % mod return tmp ''' Basically, when you do a**d % n, you actually have to calculate a**d, which could be quite large. But there are ways of computing a**d % n without having to compute a**d itself, and that is what pow does. ''' ######################################################################## ######################################################################## #b2=a[:] #1次元のときはコピーはこれで良い #print(b2) #a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ #b3=copy.deepcopy(a) #2次元配列はこうコピーする #print(b3) def main(): n=3 steps=0 state=0 w=1 j=0 k=0 n=int(input()) s=input() ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' #a,b=input().split(" ")#a,bがともに文字列のとき #a,b=map(int, input().split(" ")) #mapでとってもstrで変換すればappend可能 #nl=list(map(int, input().split(" ")))#数字の時 #s=input() a=[i for i in ascii_uppercase]#int取るとstrでも行ける b=[i for i in s]#int取るとstrでも行ける c=[] a.insert(0, 'Z') #print(a) for i in range(len(b)): x=a.index(b[i]) c.append(a[(x+n)%26]) print(''.join(c)) #print(a) #brray=[list(map(int, input().split(" ")))for i in range(N) #print(brray) for i in range(1,n+1,2):#これで1個飛ばしループになる pass #print(i) l = ['aaa', 'bbb', 'ccc'] #s = ''.join(l) #print(s) # aaabbbccc #if state in known_states and not flag: # state => 2 steps => 5 #こうやってある要素がリストの中にあるか探すのか #print(f'steps: {steps}, state: {state}') #こう書いてあるとデバックしやすい #dp= [[0]*3 for i in range(5)]#列 行 #dp用の0の入ったやつ #dp= [[0]*(w+1) for i in range(n+1)]#0からwまでのw+1回計算するから #print(dp)#初期条件が入る分計算回数+1列分必要(この場合は判断すべきものの数) DP = np.zeros(w+1, dtype=int)#これでも一次元リストが作れる exdp=np.zeros((3,4)) # 3×4の2次元配列を生成。2次元ならこう #dtypeは指定しないとfloatになる #for i in range(n):#ちょっとした入力に便利 # a, b = map(int, input().split()) #dp[i][0] += [a] #これだとintとlistをつなぐことになって不適 # dp[i] += [a] # dp[i] += [b] #これはうまくいく #やり方はいろいろあるということ #print(dp) #brray=[list(map(int, input().split(" ")))for i in range(N) #print(brray) ''' 入力 1234 出力 [1, 2, 3, 4] ''' pin_l=["x" for i in range(10)]#内包表記に慣れろ #print(pin_l) ls = ["a", "b", "c", "d", "e"] #print(ls[2:5]) #スライスでの取得 #print(ls[:-3]) #一番左端から右から3番目より左まで取得 #print(ls[:4:2]) #スライスで1個飛ばしで取得 #ないときは左端スタート #始点のインデックス番号 : 終点のインデックス番号 : スキップする数+1 #print(ls[::2]) ''' lsというリストの場合に、1つ飛びの値を取得したい場合には ls[::2] のようにします。こうすると、 ["a", "c", "d"]と出力される ''' if __name__ == "__main__": main()
[ "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] = alphabet[i+n] ans = "" for j in range(len(lst)): ans += lst[j] print(ans)
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[i] = alphabet[num+n] ans = "" for j in range(len(lst)): ans += lst[j] print(ans)
[ "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) result_list.append(self.alphabet[tmp]) # アルファベットがZより大きくならない場合 else: tmp = num + N result_list.append(self.alphabet[tmp]) return result_list if __name__ == '__main__': N = int(input()) S = [s for s in input()] rn = RotN() result_list = rn.calculate(N, S) result = '' for x in result_list: result += x print(result)
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) result_list.append(self.alphabet[abs(tmp)-1]) # アルファベットがZより大きくならない場合 else: tmp = num + N result_list.append(self.alphabet[tmp]) return result_list if __name__ == '__main__': N = int(input()) S = [s for s in input()] rn = RotN() result_list = rn.calculate(N, S) result = '' for x in result_list: result += x print(result)
[ "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