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
p02853
X=list(map(int, input())) t=0 for i in range(len(X)): if X[i]==1: t+=300000 elif X[i]==2: t+=200000 elif X[i]==3: t+=100000 if X[0]==X[1] and X[0]==1: t+=400000 print(t)
X=list(map(int, input().split())) t=0 for i in range(len(X)): if X[i]==1: t+=300000 elif X[i]==2: t+=200000 elif X[i]==3: t+=100000 if X[0]==X[1] and X[0]==1: t+=400000 print(t)
[ "call.add" ]
657,686
657,687
u363836311
python
p02853
x,y=map(int,input().split()) ans=0 if x<=3: ans+=(4-x)*100000 if y<=3: ans+=(4-x)*100000 if ans==600000: ans=1000000 print(ans)
x,y=map(int,input().split()) ans=0 if x<=3: ans+=(4-x)*100000 if y<=3: ans+=(4-y)*100000 if ans==600000: ans=1000000 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
657,698
657,699
u217627525
python
p02853
X, Y = map(int, input().split()) ans = 0 if X <= 3: ans += (4 - X) * 10 ** 5 if Y <= 3: ans += (4 - X) * 10 ** 5 if X == Y == 1: ans += 4 * 10 ** 5 print(ans)
X, Y = map(int, input().split()) ans = 0 if X <= 3: ans += (4 - X) * 10 ** 5 if Y <= 3: ans += (4 - Y) * 10 ** 5 if X == Y == 1: ans += 4 * 10 ** 5 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
657,700
657,701
u278057806
python
p02853
x,y = map(int,input().split()) s=[0,] d={ 1:30000, 2:20000, 3:10000, } if x in d: s.append(d[x]) if y in d: s.append(d[y]) if x==1 and y==1: s.append(40000) print(sum(s))
x,y = map(int,input().split()) s=[0,] d={ 1:300000, 2:200000, 3:100000, } if x in d: s.append(d[x]) if y in d: s.append(d[y]) if x==1 and y==1: s.append(400000) print(sum(s))
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change" ]
657,708
657,709
u075155299
python
p02853
X, Y = map(int, input().split()) P = [300000, 200000, 100000, 0] if X == 1 and Y == 1: print(100000) else: print(P[min(3, X - 1)] + P[min(3, Y - 1)])
X, Y = map(int, input().split()) P = [300000, 200000, 100000, 0] if X == 1 and Y == 1: print(1000000) else: print(P[min(3, X - 1)] + P[min(3, Y - 1)])
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
657,713
657,714
u663710122
python
p02853
x,y = map(int,input().split()) def point(a): if a == 1: return 300000 elif a == 2: return 200000 elif a == 3: return 100000 else: return 0 a = point(x) b = point(y) if a == 1 and b == 1: print(1000000) else: print(a+b)
x,y = map(int,input().split()) def point(a): if a == 1: return 300000 elif a == 2: return 200000 elif a == 3: return 100000 else: return 0 c = point(x) b = point(y) if x == 1 and y == 1: print(1000000) else: print(c+b)
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
657,725
657,726
u368796742
python
p02853
x, y = map(int(input().split())) ans = 0 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 if x == 1 and y == 1: ans += 400000 print(ans)
x, y = map(int,input().split()) ans = 0 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 if x == 1 and y == 1: ans += 400000 print(ans)
[ "assignment.value.change", "call.arguments.change" ]
657,727
657,728
u426108351
python
p02853
codePlace, implePlace = map(int, input().split(" ")) priceDict = { "1":300000, "2":200000, "3":100000 } totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0 totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0 totalPrice += 400000 if codePlace == 1 and implePla...
codePlace, implePlace = map(int, input().split(" ")) priceDict = { 1:300000, 2:200000, 3:100000 } totalPrice = priceDict[codePlace] if codePlace in priceDict.keys() else 0 totalPrice += priceDict[implePlace] if implePlace in priceDict.keys() else 0 totalPrice += 400000 if codePlace == 1 and implePlace == ...
[]
657,747
657,748
u851279551
python
p02853
n,m = map(int,input().split()) lis = [0]*205 lis[0] == 300000 lis[1] == 200000 lis[2] == 100000 if n == m and n == 1: print(1000000) else: print(lis[n-1]+lis[m-1])
n,m = map(int,input().split()) lis = [0]*205 lis[0] = 300000 lis[1] = 200000 lis[2] = 100000 if n == m and n == 1: print(1000000) else: print(lis[n-1]+lis[m-1])
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
657,751
657,752
u728615412
python
p02853
n,m = map(int,input().split()) lis = [0]*205 lis[0] == 30000 lis[1] == 20000 lis[2] == 10000 if n == m and n == 1: print(1000000) else: print(lis[n-1]+lis[m-1])
n,m = map(int,input().split()) lis = [0]*205 lis[0] = 300000 lis[1] = 200000 lis[2] = 100000 if n == m and n == 1: print(1000000) else: print(lis[n-1]+lis[m-1])
[]
657,753
657,752
u728615412
python
p02853
def main(x: int, y: int): award = 0 if (x and y) == 1: award += 400000 for i in [x, y]: if i == 1: award += 300000 elif i == 2: award += 200000 elif i == 3: award += 100000 print(award) if __name__ == "__main__": x, y = map(int...
def main(x: int, y: int): award = 0 if x == y == 1: award += 400000 for i in [x, y]: if i == 1: award += 300000 elif i == 2: award += 200000 elif i == 3: award += 100000 print(award) if __name__ == "__main__": x, y = map(int, i...
[ "control_flow.branch.if.condition.change" ]
657,756
657,757
u977642052
python
p02853
def main(x: int, y: int): award: int = 0 if (x and y) == 1: award += 400000 for i in [x, y]: if i == 1: award += 300000 elif i == 2: award += 200000 elif i == 3: award += 100000 print(award) if __name__ == "__main__": x, y = ma...
def main(x: int, y: int): award = 0 if x == y == 1: award += 400000 for i in [x, y]: if i == 1: award += 300000 elif i == 2: award += 200000 elif i == 3: award += 100000 print(award) if __name__ == "__main__": x, y = map(int, i...
[ "control_flow.branch.if.condition.change" ]
657,758
657,757
u977642052
python
p02853
n = [int(i) for i in input().split()] T=0 for i in range(2): if n[i] == 1: T+=3 elif n[i] == 1: T+=2 elif n[i] == 3: T+=1 if sum(n)==2: T+=4 print(T*100000)
n = [int(i) for i in input().split()] T=0 for i in range(2): if n[i] == 1: T+=3 elif n[i] == 2: T+=2 elif n[i] == 3: T+=1 if sum(n)==2: T+=4 print(T*100000)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
657,761
657,762
u295294832
python
p02853
x,y=map(int,input()) if(x==y==1): print(1000000) else: ans=max(4-x,0)*100000+max(4-y,0)*100000 print(ans)
x,y=map(int,input().split()) if(x==y==1): print(1000000) else: ans=max(4-x,0)*100000+max(4-y,0)*100000 print(ans)
[ "call.add" ]
657,764
657,765
u256868077
python
p02853
X,Y = map(int,input().split()) ans = 0 if X <= 3 : ans += (4-X)*100000 if Y <= 3 : ans += (4-X)*100000 if X == 1 and Y == 1: ans += 400000 print(ans)
X,Y = map(int,input().split()) ans = 0 if X <= 3 : ans += (4-X)*100000 if Y <= 3 : ans += (4-Y)*100000 if X == 1 and Y == 1: ans += 400000 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
657,776
657,777
u009348313
python
p02853
import sys input = sys.stdin.readline def main(): X, Y = list(map(int, input().split())) # X = list(map(int, input().split())) ans = 0 if X == 3: ans += 100000 elif X == 2: ans += 100000 elif X == 1: ans += 300000 if Y == 3: ans += 100000 elif Y == 2: ...
import sys input = sys.stdin.readline def main(): X, Y = list(map(int, input().split())) # X = list(map(int, input().split())) ans = 0 if X == 3: ans += 100000 elif X == 2: ans += 200000 elif X == 1: ans += 300000 if Y == 3: ans += 100000 elif Y == 2: ...
[ "literal.number.integer.change" ]
657,800
657,801
u642874916
python
p02853
x,y = map(int, input().split()) ans = 0 d = [300000,200000,100000] if 1<=x and x<=3: ans += d[x-1] if 1<=y and y<=3: ans += d[x-1] if x==y and x==1: ans += 400000 print(ans)
x,y = map(int, input().split()) ans = 0 d = [300000,200000,100000] if 1<=x and x<=3: ans += d[x-1] if 1<=y and y<=3: ans += d[y-1] if x==y and x==1: ans += 400000 print(ans)
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
657,804
657,805
u117348081
python
p02853
x, y = map(int, input().split()) ans = max(0,4-x) + max(0,3-y) if x==1==y: ans += 4 print(ans*100000)
x, y = map(int, input().split()) ans = max(0,4-x) + max(0,4-y) if x==1==y: ans += 4 print(ans*100000)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
657,806
657,807
u242031676
python
p02853
a,b=map(int,input().split()) ans=0 if a<=3: ans+=(4-a)*10**5 if b<=3: ans+=(4-a)*10**5 if a==b==1: ans+=4*10**5 print(ans)
a,b=map(int,input().split()) ans=0 if a<=3: ans+=(4-a)*10**5 if b<=3: ans+=(4-b)*10**5 if a==b==1: ans+=4*10**5 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
657,834
657,835
u995109095
python
p02853
X, Y = map(int, input().split()) points = [-1, 100000, 200000, 300000, 0] print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])
X, Y = map(int, input().split()) points = [-1, 300000, 200000, 100000, 0] print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])
[ "literal.number.integer.change", "assignment.value.change" ]
657,846
657,847
u599547273
python
p02853
X, Y = map(int, input().split()) points = [-1, 100000, 200000, 300000, 0] print(400000*(X==Y==1) + points[max(4, X)] + points[max(4, Y)])
X, Y = map(int, input().split()) points = [-1, 300000, 200000, 100000, 0] print(400000*(X==Y==1) + points[min(4, X)] + points[min(4, Y)])
[ "literal.number.integer.change", "assignment.value.change", "misc.opposites", "identifier.change", "call.function.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
657,848
657,847
u599547273
python
p02853
a, b = [int(x) for x in input().split()] won = 0 if a in range(1, 4): won += [0,300000,200000,200000][a] if b in range(1, 4): won += [0,300000,200000,100000][b] if a == 1 and b == 1:won += 400000 print(won)
a, b = [int(x) for x in input().split()] won = 0 if a in range(1, 4): won += [0,300000,200000,100000][a] if b in range(1, 4): won += [0,300000,200000,100000][b] if a == 1 and b == 1:won += 400000 print(won)
[ "literal.number.integer.change" ]
657,851
657,852
u674190122
python
p02853
X, Y = map(int, input().split()) r = 0 if(X == 1): r += 300000 elif(X == 2): r += 200000 elif(X == 3): r += 300000 else: pass if(Y == 1): r += 300000 elif(Y == 2): r += 200000 elif(Y == 3): r += 300000 if(X == Y == 1): r += 400000 print(r)
X, Y = map(int, input().split()) r = 0 if(X == 1): r += 300000 elif(X == 2): r += 200000 elif(X == 3): r += 100000 else: pass if(Y == 1): r += 300000 elif(Y == 2): r += 200000 elif(Y == 3): r += 100000 else: pass if(X == Y == 1): r += 400000 print(r)
[ "literal.number.integer.change", "control_flow.pass.add" ]
657,853
657,854
u716529032
python
p02853
X, Y = map(int, input().split()) ans = 0 if X == 3: ans += 100000 elif X == 2: ans += 200000 elif X == 1: ans + 300000 if Y == 3: ans += 100000 elif Y == 2: ans += 200000 elif Y == 1: ans + 300000 if ans == 600000: ans += 400000 print(ans)
X, Y = map(int, input().split()) ans = 0 if X == 3: ans += 100000 elif X == 2: ans += 200000 elif X == 1: ans += 300000 if Y == 3: ans += 100000 elif Y == 2: ans += 200000 elif Y == 1: ans += 300000 if ans == 600000: ans += 400000 print(ans)
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change" ]
657,855
657,856
u500297289
python
p02853
X,Y = map(int,input().split()) if X*Y == 1: print(10^6) else: print(10^5*(max(0,4-X)+max(0,4-Y)))
X,Y = map(int,input().split()) if X*Y == 1: print(10**6) else: print(10**5*(max(0,4-X)+max(0,4-Y)))
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
657,867
657,868
u747602774
python
p02853
X,Y = map(int,input().split()) if X*Y == 1: print(10^6) else: print(10^5*(max(0,4-X)+max(0,4-X)))
X,Y = map(int,input().split()) if X*Y == 1: print(10**6) else: print(10**5*(max(0,4-X)+max(0,4-Y)))
[ "call.arguments.change", "expression.operation.binary.change", "io.output.change", "identifier.change" ]
657,869
657,868
u747602774
python
p02853
x,y=map(int,input().split()) if (x==y==1): output=1000000 elif (x*y==2): output=500000 elif (x*y==3): output=400000 elif (x*y==4): output=400000 elif (x*y==6): output=300000 elif (x*y==9): output=200000 #x or y elif (x==1 or y==1): output=300000 elif (x==2 or y==2): output=200000 elif (x==3 or y==...
x,y=map(int,input().split()) if (x==y==1): output=1000000 elif (x*y==2): output=500000 elif (x*y==3): output=400000 #elif (x*y==4):4*1が存在 elif (x==y==2): output=400000 elif (x*y==6): output=300000 elif (x*y==9): output=200000 #x or y elif (x==1 or y==1): output=300000 elif (x==2 or y==2): output=2...
[ "control_flow.branch.if.condition.change", "literal.number.integer.change" ]
657,872
657,873
u117078923
python
p02853
n = input().split(' ') third = 100000 second = 200000 first = 300000 sum = 0 for i in n: if int(i) == 3: sum = sum + third elif int(i) == 2: sum = sum + second elif int(i) == 1: sum = sum + first if int(n[0]) == 1 and int(n[1]): sum = sum + 400000 print(sum)
n = input().split(' ') third = 100000 second = 200000 first = 300000 sum = 0 for i in n: if int(i) == 3: sum = sum + third elif int(i) == 2: sum = sum + second elif int(i) == 1: sum = sum + first if int(n[0]) == 1 and int(n[1]) == 1: sum = sum + 400000 print(sum)
[ "control_flow.branch.if.condition.change" ]
657,883
657,884
u719181921
python
p02853
X, Y = map(int, input().split()) if X == 1 and Y == 1: print(1000000) elif (X == 1 and Y == 2) or (X == 2 and Y == 1): print(500000) elif (X == 1 and Y == 3) or (X == 3 and Y == 1) or (X == 2 and Y == 2): print(400000) elif (X == 1 and Y >= 4) or (X >= 4 and Y == 1) or (X == 2 and Y == 3) or (X == 3 and...
X, Y = map(int, input().split()) if X == 1 and Y == 1: print(1000000) elif (X == 1 and Y == 2) or (X == 2 and Y == 1): print(500000) elif (X == 1 and Y == 3) or (X == 3 and Y == 1) or (X == 2 and Y == 2): print(400000) elif (X == 1 and Y >= 4) or (X >= 4 and Y == 1) or (X == 2 and Y == 3) or (X == 3 and...
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
657,885
657,886
u948050032
python
p02853
X, Y = map(int, input().split()) if X <= 3 and Y <= 3: ans = (4-X) * 100000 + (4-Y) * 100000 if X == 1 and Y == 1: ans += 400000 elif X <= 3: ans = (4-X) * 100000 elif Y <= 3: ans = (4-Y) * 100000 print(ans)
X, Y = map(int, input().split()) if X <= 3 and Y <= 3: ans = (4-X) * 100000 + (4-Y) * 100000 if X == 1 and Y == 1: ans += 400000 elif X <= 3: ans = (4-X) * 100000 elif Y <= 3: ans = (4-Y) * 100000 else: ans = 0 print(ans)
[ "assignment.add" ]
657,896
657,897
u194297606
python
p02853
x, y = input().split() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 or int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
x, y = input().split() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 and int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
[ "control_flow.branch.if.condition.change", "call.arguments.add" ]
657,902
657,903
u631525844
python
p02853
x, y = input(), input() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 or int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
x, y = input().split() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 and int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
[ "control_flow.branch.if.condition.change" ]
657,904
657,903
u631525844
python
p02853
x, y = input().split() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 or int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
x, y = input().split() price = 0 try: if 1 <= int(x) <= 205 and 1 <= int(y) <= 205: if int(x) == 1 and int(y) == 1: price += 400000 if int(x) == 1: price += 300000 elif int(x) == 2: price += 200000 elif int(x) == 3: price += 100000 ...
[ "control_flow.branch.if.condition.change" ]
657,905
657,903
u631525844
python
p02853
input_number = input() input_list = input_number.split() coding_contest_rank = int(input_list[0]) robot_maneuver_rank = int(input_list[1]) if coding_contest_rank == 1: coding_contest_money = 300000 if robot_maneuver_rank == 1: robot_maneuver_money = 300000 if coding_contest_rank == 2: coding_contest_money ...
input_number = input() input_list = input_number.split() coding_contest_rank = int(input_list[0]) robot_maneuver_rank = int(input_list[1]) if coding_contest_rank == 1: coding_contest_money = 300000 if robot_maneuver_rank == 1: robot_maneuver_money = 300000 if coding_contest_rank == 2: coding_contest_money ...
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
657,908
657,909
u209631375
python
p02853
A, B = map(int, input().split()) list = [500000,300000,200000,100000,0] if(A>3): A = 4 elif(B>3): B = 4 elif(A==1 and B==1): A=B=0 money = list[A]+list[B] print(money)
A, B = map(int, input().split()) list = [500000,300000,200000,100000,0] if(A>3): A = 4 if(B>3): B = 4 elif(A==1 and B==1): A=B=0 money = list[A]+list[B] print(money)
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
657,910
657,911
u589047182
python
p02853
x,y=map(int,input().split()) if x==1 and y==1: print(1000000) elif x<=3 and y>=4: print((x-4)*(-100000)) elif x>=4 and y<=3: print((y-4)*(-100000)) elif x<=3 and y<=3: peint(((x-4)*(-100000))+((y-4)*(-100000))) else: print(0)
x,y=map(int,input().split()) if x==1 and y==1: print(1000000) elif x<=3 and y>=4: print((x-4)*(-100000)) elif x>=4 and y<=3: print((y-4)*(-100000)) elif x<=3 and y<=3: print((x-4)*(-100000)+(y-4)*(-100000)) else: print(0)
[ "identifier.change", "call.function.change", "call.arguments.change" ]
657,916
657,917
u740047492
python
p02853
x,y=map(int,input().split()) if x==1 and y==1: print(1000000) elif x<=3 and y>=4: print((x-4)*(-100000)) elif x>=4 and y<=3: print((y-4)*(-100000)) elif x<=3 and y<=3: peint((x-4)*(-100000)+(y-4)*(-100000)) else: print(0)
x,y=map(int,input().split()) if x==1 and y==1: print(1000000) elif x<=3 and y>=4: print((x-4)*(-100000)) elif x>=4 and y<=3: print((y-4)*(-100000)) elif x<=3 and y<=3: print((x-4)*(-100000)+(y-4)*(-100000)) else: print(0)
[ "identifier.change", "call.function.change" ]
657,918
657,917
u740047492
python
p02853
X, Y = map(int, input().split()) if X == 1: x = 30000 elif X == 2: x = 20000 elif X == 3: x = 10000 else: x = 0 if Y == 1: y = 30000 elif Y == 2: y = 20000 elif Y == 3: y = 10000 else: y = 0 if X == 1 and Y == 1: print(1000000) else: print(x+y)
X, Y = map(int, input().split()) if X == 1: x = 300000 elif X == 2: x = 200000 elif X == 3: x = 100000 else: x = 0 if Y == 1: y = 300000 elif Y == 2: y = 200000 elif Y == 3: y = 100000 else: y = 0 if X == 1 and Y == 1: print(1000000) else: print(x+y)
[ "literal.number.integer.change", "assignment.value.change" ]
657,939
657,940
u212786022
python
p02853
X, Y = map(int, input().split()) ranks = [X, Y] ans = 0 for i in ranks: if i == 1: ans += 300000 elif i == 2: ans += 200000 elif i == 3: ans += 100000 if (X, Y) == (1, 1): ans = 700000 print(ans)
X, Y = map(int, input().split()) ranks = [X, Y] ans = 0 for i in ranks: if i == 1: ans += 300000 elif i == 2: ans += 200000 elif i == 3: ans += 100000 if (X, Y) == (1, 1): ans = 1000000 print(ans)
[ "literal.number.integer.change", "assignment.value.change" ]
657,945
657,946
u982591663
python
p02853
A, B = map(int, input().split()) money = 0 if A==1 and B ==1: print("1000000") elif A<4 and B > 3: money = 100000 * (4-A) print(money) elif A>3 and B < 4: money = 100000 * (4-B) print(money) elif A <3 and B <3: money = 100000 * (4-A) + 100000 * (4-B) print(money) else: print("0")
A, B = map(int, input().split()) money = 0 if A==1 and B ==1: print("1000000") elif A<4 and B > 3: money = 100000 * (4-A) print(money) elif A>3 and B < 4: money = 100000 * (4-B) print(money) elif A <4 and B <4: money = 100000 * (4-A) + 100000 * (4-B) print(money) else: print("0")
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
657,947
657,948
u439319240
python
p02853
X,Y = map(int, input().split()) ls = [300000, 200000, 100000] + [0 for i in range(300)] result = ls[X - 1] + ls[Y - 1] if X == 1 & Y == 1: result += 400000 print(result)
X,Y = map(int, input().split()) ls = [300000, 200000, 100000] + [0 for i in range(300)] result = ls[X - 1] + ls[Y - 1] if X == 1 and Y == 1: result += 400000 print(result)
[ "control_flow.branch.if.condition.change" ]
657,971
657,972
u798894056
python
p02853
x,y = map(int,input().split()) ans = 0 if x == 1 : ans = 300000 elif x == 2: ans = 200000 elif x == 3: ans = 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 if x == 1: ans += 400000 if y == 1: ans += 400000 print(ans)
x,y = map(int,input().split()) ans = 0 if x == 1 : ans = 300000 elif x == 2: ans = 200000 elif x == 3: ans = 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 if x == 1 and y == 1: ans += 400000 print(ans)
[]
657,973
657,974
u671239754
python
p02853
X,Y = map(int,input().split()) total = 0 if X <= 3: total += (4 - X) * 100000 if Y <= 3: total += (4 - X) * 100000 if X==1 and Y==1: total += 400000 print(total)
X,Y = map(int,input().split()) total = 0 if X <= 3: total += (4 - X) * 100000 if Y <= 3: total += (4 - Y) * 100000 if X==1 and Y==1: total += 400000 print(total)
[ "identifier.change", "expression.operation.binary.change" ]
657,975
657,976
u159217536
python
p02853
X, Y = map(int, input().split()) ans = 0 if X == Y == 1: ans = 400000 + 300000 + 300000 else: if X == 1 or Y == 1: ans += 300000 elif X == 2: ans += 200000 elif Y == 2: ans += 200000 elif X == 3: ans += 100000 elif Y == 3: ans += 100000 print(ans)
X, Y = map(int, input().split()) ans = 0 if X == Y == 1: ans = 400000 + 300000 + 300000 else: if X == 1 or Y == 1: ans += 300000 if X == 2: ans += 200000 if Y == 2: ans += 200000 if X == 3: ans += 100000 if Y == 3: ans += 100000 print(ans)
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
657,989
657,990
u045909335
python
p02853
x,y=map(int,input().split()) x=0 if x>=4 else x y=0 if y>=4 else y print(1000000 if x==1 and y==1 else (x+y)*100000)
x,y=map(int,input().split()) x=0 if x>=4 else 4-x y=0 if y>=4 else 4-y print(1000000 if x==3 and y==3 else (x+y)*100000)
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
658,001
658,002
u809457879
python
p02853
a,b = map(int,input().split()) c = 0 if a == 3: c += 1 elif a == 2: c += 2 elif a == 1: c += 3 if b == 3: c += 1 elif b == 2: c += 2 elif b == 1: c += 3 if a == b == 1: c += 4
a,b = map(int,input().split()) c = 0 if a == 3: c += 1 elif a == 2: c += 2 elif a == 1: c += 3 if b == 3: c += 1 elif b == 2: c += 2 elif b == 1: c += 3 if a == b == 1: c += 4 print(c*100000)
[ "call.add" ]
658,003
658,004
u853900545
python
p02853
a,b = map(int,input().split()) c = 0 if a == 3: c += 1 elif a == 2: c += 2 elif a == 1: c += 3 if b == 3: c += 1 elif b == 2: b += 2 elif a == 1: b += 3 if a == b == 1: c += 4 print(c*100000)
a,b = map(int,input().split()) c = 0 if a == 3: c += 1 elif a == 2: c += 2 elif a == 1: c += 3 if b == 3: c += 1 elif b == 2: c += 2 elif b == 1: c += 3 if a == b == 1: c += 4 print(c*100000)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
658,005
658,004
u853900545
python
p02853
X, Y = map(int, input().split()) KANE = [ 300000, 200000, 100000 ] ans=0 if X <= 3: ans = KANE[X-1] if Y <= 3: ans = KANE[Y-1] if X == 1 and Y == 1: ans += 400000 print(ans)
X, Y = map(int, input().split()) KANE = [ 300000, 200000, 100000 ] ans=0 if X <= 3: ans += KANE[X-1] if Y <= 3: ans += KANE[Y-1] if X == 1 and Y == 1: ans += 400000 print(ans)
[ "assignment.value.change" ]
658,006
658,007
u067729694
python
p02853
x, y = list(map(int, input().split())) ans = 0 if x == 1 and y == 1: ans += 400000 elif x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 elif y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 print(ans)
x, y = list(map(int, input().split())) ans = 0 if x == 1 and y == 1: ans += 400000 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 print(ans)
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
658,008
658,009
u597455618
python
p02853
x,y = map(int,input().split()) l = [0,300000,200000,100000] alpha = 400000 ans = 0 if x == 1 and y == 1: ans = l[1]*2 + alpha print(ans) else: if 1 <= x <= 3: ans = l[x] if 1 <= y <= 3: ans = l[y] print(ans)
x,y = map(int,input().split()) l = [0,300000,200000,100000] alpha = 400000 ans = 0 if x == 1 and y == 1: ans = l[1]*2 + alpha print(ans) else: if 1 <= x <= 3: ans += l[x] if 1 <= y <= 3: ans += l[y] print(ans)
[ "assignment.value.change" ]
658,014
658,015
u135847648
python
p02853
x,y=map(int,input().split()) a=0 if x==3: a+=1 if y==3: a+=1 if x==2: a+=2 if y==2: a+=2 if x==1: a+=3 if x==1: a+=3 if x==y==1: a+=4 print(a*100000)
x,y=map(int,input().split()) a=0 if x==3: a+=1 if y==3: a+=1 if x==2: a+=2 if y==2: a+=2 if x==1: a+=3 if y==1: a+=3 if x==1 and y==1: a+=4 print(a*100000)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
658,020
658,021
u187516587
python
p02853
x, y = map(int, input().split()) d = {1:300000, 2:200000, 3:100000} if x == 1 and y == 1: print(10**6) exit() su = 0 if x in d: su += d[x] if y in d: su += d[x] print(su)
x, y = map(int, input().split()) d = {1:300000, 2:200000, 3:100000} if x == 1 and y == 1: print(10**6) exit() su = 0 if x in d: su += d[x] if y in d: su += d[y] print(su)
[ "identifier.change", "variable_access.subscript.index.change" ]
658,028
658,029
u116763463
python
p02853
X, Y = map(int,input().split()) AnswerX = 0 AnswerY = 0 AnswerW = 0 if X*Y == 1: AnswerW = 400000 if X == 1: AnswerX= 300000 elif X==2: AnswerX = 20000 elif X==3: AnswerX = 10000 if Y == 1: AnswerY= 300000 elif Y==2: AnswerY = 20000 elif Y==3: AnswerY = 10000 Answer = AnswerX + AnswerY + AnswerW print(...
X, Y = map(int,input().split()) AnswerX = 0 AnswerY = 0 AnswerW = 0 if X*Y == 1: AnswerW = 400000 if X == 1: AnswerX= 300000 elif X==2: AnswerX = 200000 elif X==3: AnswerX = 100000 if Y == 1: AnswerY= 300000 elif Y==2: AnswerY = 200000 elif Y==3: AnswerY = 100000 Answer = AnswerX + AnswerY + AnswerW pr...
[ "literal.number.integer.change", "assignment.value.change" ]
658,036
658,037
u760794812
python
p02853
X,Y=map(int,input().split()) prize=0 if X==1: prize+=300000 if Y==1: prize+=700000 elif Y==2: prize+=200000 elif Y==3: prize+=100000 else: pass elif X==2: prize+=200000 if Y==1: prize+=300000 elif Y==2: prize+=200000 elif Y==3: ...
X,Y=map(int,input().split()) prize=0 if X==1: prize+=300000 if Y==1: prize+=700000 elif Y==2: prize+=200000 elif Y==3: prize+=100000 else: pass elif X==2: prize+=200000 if Y==1: prize+=300000 elif Y==2: prize+=200000 elif Y==3: ...
[]
658,038
658,039
u547608423
python
p02853
X,Y=map(int,input().split()) prize=0 if X==1: prize+=300000 if Y==1: pprize+=700000 elif Y==2: prize+=200000 elif Y==3: prize+=100000 else: pass elif X==2: prize+=200000 if Y==1: prize+=300000 elif Y==2: prize+=200000 elif Y==3: ...
X,Y=map(int,input().split()) prize=0 if X==1: prize+=300000 if Y==1: prize+=700000 elif Y==2: prize+=200000 elif Y==3: prize+=100000 else: pass elif X==2: prize+=200000 if Y==1: prize+=300000 elif Y==2: prize+=200000 elif Y==3: ...
[ "identifier.change" ]
658,040
658,039
u547608423
python
p02853
s=0 for i in map(int, input().split()): if i==1: s+=300000 elif i==2: s+200000 elif i==3: s+=100000 if s==600000: s+=400000 print(s)
s = 0 for i in map(int, input().split()): if i==1: s+=300000 elif i==2: s+=200000 elif i==3: s+=100000 if s==600000: s=1000000 print(s)
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change" ]
658,041
658,042
u741268465
python
p02853
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) def get_money(rank): money = 0 if rank == 1: money = 300000 elif rank == 2: money = 200000 elif rank == 3: money = 100000 return money ans = 0 ans += get_money(X) ans += get_money(Y) if X == 1 & Y == 1: ans += 40...
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) def get_money(rank): money = 0 if rank == 1: money = 300000 elif rank == 2: money = 200000 elif rank == 3: money = 100000 return money ans = 0 ans += get_money(X) ans += get_money(Y) if X == 1 and Y == 1: ans += ...
[ "control_flow.branch.if.condition.change" ]
658,058
658,059
u811817592
python
p02853
aw = 0 for i in map(int, input().split()): if i == 1: s+=300000 elif i ==2 : s+= 200000 elif i ==3 : s+= 100000 if aw== 600000: aw= 1000000 print(aw)
aw = 0 for i in map(int, input().split()): if i == 1: aw+=300000 elif i ==2 : aw+= 200000 elif i ==3 : aw+= 100000 if aw== 600000: aw= 1000000 print(aw)
[ "identifier.change" ]
658,064
658,065
u843845221
python
p02853
import math#数学的計算はこれでいける。普通に0.5乗しても計算可能 N = 1 x, y = [0]*N, [0]*N#N個の空のリストを作成 l = list(range(N))#範囲がNのリストを作成する sum=0 #print(x[0]) for i in range(N): x[i], y[i] = map(int, input().split()) if x[0] <= 3: sum=sum+10000*(4-x[0]) else: pass if y[0]<= 3: sum=sum+10000*(4-y[0]) else: pass if x[0]==1 and y[...
# -*- Coding: utf-8 -*- import itertools#これは色々使える組み込み関数みたいなやつ import math#数学的計算はこれでいける。普通に0.5乗しても計算可能 N = 1 x, y = [0]*N, [0]*N#N個の空のリストを作成 l = list(range(N))#範囲がNのリストを作成する sum=0 #print(x[0]) for i in range(N): x[i], y[i] = map(int, input().split()) if x[0] <= 3: sum=sum+100000*(4-x[0]) else: pass if y[0]<=...
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
658,075
658,076
u007886915
python
p02853
x,y = (int(x) for x in input().split()) if x>3 & y>3: print(0) elif x<=3 & y<=3: if x+y == 2: print(1000000) elif x+y == 3: print(500000) elif x+y == 4: print(400000) elif x+y == 5: print(300000) else: print(200000) else: z = min(x,y) if z == 1: ...
x,y = (int(x) for x in input().split()) if x>3 and y>3: print(0) elif x<=3 and y<=3: if x+y == 2: print(1000000) elif x+y == 3: print(500000) elif x+y == 4: print(400000) elif x+y == 5: print(300000) else: print(200000) else: z = min(x,y) if z == ...
[ "control_flow.branch.if.condition.change" ]
658,077
658,078
u985408358
python
p02853
X, Y = map(int, input().split()) prices = {1: 300000, 2: 200000, 3: 100000} ans = 0 if X < 4: ans += prices[X] if Y < 4: ans += prices[Y] if Y == 1 & X == 1: ans += 400000 print(ans)
X, Y = map(int, input().split()) prices = {1: 300000, 2: 200000, 3: 100000} ans = 0 if X < 4: ans += prices[X] if Y < 4: ans += prices[Y] if Y == 1 and X == 1: ans += 400000 print(ans)
[ "control_flow.branch.if.condition.change" ]
658,090
658,091
u254634413
python
p02853
X, Y = map(int, input().split()) prices = {1: 300000, 2: 200000, 3: 1000000} ans = 0 if X < 4: ans += prices[X] if Y < 4: ans += prices[Y] if Y == 1 and X == 1: ans += 400000 print(ans)
X, Y = map(int, input().split()) prices = {1: 300000, 2: 200000, 3: 100000} ans = 0 if X < 4: ans += prices[X] if Y < 4: ans += prices[Y] if Y == 1 and X == 1: ans += 400000 print(ans)
[ "literal.number.integer.change", "assignment.value.change" ]
658,092
658,091
u254634413
python
p02853
x, y = map(int, input().split()) ans += max(0, (4-x)*100000) ans += max(0, (4-y)*100000) if x == 1 and y == 1: ans += 400000 print(ans)
x, y = map(int, input().split()) ans = 0 ans += max(0, (4-x)*100000) ans += max(0, (4-y)*100000) if x == 1 and y == 1: ans += 400000 print(ans)
[ "assignment.add" ]
658,108
658,109
u299869545
python
p02853
x, y = map(int, input().split()) ans = 0 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 10000 if x == 1 and y == 1: ans += 400000 print(ans)
x, y = map(int, input().split()) ans = 0 if x == 1: ans += 300000 elif x == 2: ans += 200000 elif x == 3: ans += 100000 if y == 1: ans += 300000 elif y == 2: ans += 200000 elif y == 3: ans += 100000 if x == 1 and y == 1: ans += 400000 print(ans)
[ "literal.number.integer.change" ]
658,114
658,115
u552746936
python
p02853
x,y = map(int ,input().split()) l=[300000,200000,100000,0] if x>=4: x=4 elif y>=4: y=4 if x==1 and y==1: print(1000000) else: print(l[x-1]+l[y-1])
x,y = map(int ,input().split()) l=[300000,200000,100000,0] if x>=4: x=4 if y>=4: y=4 if x==1 and y==1: print(1000000) else: print(l[x-1]+l[y-1])
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
658,116
658,117
u117193815
python
p02853
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) sum = 0 if(X == 1): sum = 300000 elif(X == 2): sum = 200000 elif(X == 3): sum = 10000 if(Y == 1): sum += 300000 elif(Y == 2): sum += 200000 elif(Y == 3): sum += 100000 if(X == 1 and Y == 1): sum += 400000 print(int(sum))
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) sum = 0 if(X == 1): sum = 300000 elif(X == 2): sum = 200000 elif(X == 3): sum = 100000 if(Y == 1): sum += 300000 elif(Y == 2): sum += 200000 elif(Y == 3): sum += 100000 if(X == 1 and Y == 1): sum += 400000 print(sum)
[ "literal.number.integer.change", "assignment.value.change", "call.remove", "call.arguments.change" ]
658,121
658,122
u171115409
python
p02853
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) sum = 0 if(X == 1): sum = 300000 elif(X == 2): sum = 200000 elif(X == 3): sum = 10000 if(Y == 1): sum += 300000 elif(Y == 2): sum += 200000 elif(Y == 3): sum += 100000 if(X == 1 and Y == 1): sum += 400000 print(sum)
# -*- coding: utf-8 -*- X, Y = map(int, input().split()) sum = 0 if(X == 1): sum = 300000 elif(X == 2): sum = 200000 elif(X == 3): sum = 100000 if(Y == 1): sum += 300000 elif(Y == 2): sum += 200000 elif(Y == 3): sum += 100000 if(X == 1 and Y == 1): sum += 400000 print(sum)
[ "literal.number.integer.change", "assignment.value.change" ]
658,123
658,122
u171115409
python
p02853
a,b = map(int,input().split()) if a+b==2: print(1000000) else: ans =0 if a<=3: ans+= (4-a)*100000 if b<=3: ans+= (4-a)*100000 print(ans)
a,b = map(int,input().split()) if a+b==2: print(1000000) else: ans =0 if a<=3: ans+= (4-a)*100000 if b<=3: ans+= (4-b)*100000 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
658,127
658,128
u115110170
python
p02853
X, Y = map(int, input().split()) ans = 0 k = [3, 2, 1] if X <= 3: ans += k[X-1] if Y <= 3: ans += k[X-1] if X == 1 and Y == 1: ans += 4 print(ans * 100000)
X, Y = map(int, input().split()) ans = 0 k = [3, 2, 1] if X <= 3: ans += k[X-1] if Y <= 3: ans += k[Y-1] if X == 1 and Y == 1: ans += 4 print(ans * 100000)
[ "identifier.change", "variable_access.subscript.index.change", "expression.operation.binary.change" ]
658,131
658,132
u552357043
python
p02853
x,y = map(int,input().split()) if x == 1 and y == 1:print(int(7e5)) elif 1<=x<=3 and 1<=y<=3: print(int((8-x-y)*1e5)) elif 1<=x<=3:print(int((4-x)*1e5)) elif 1<=y<=3:print(int((4-y)*1e5)) else:print(0)
x,y = map(int,input().split()) if x == 1 and y == 1:print(int(10e5)) elif 1<=x<=3 and 1<=y<=3: print(int((8-x-y)*1e5)) elif 1<=x<=3:print(int((4-x)*1e5)) elif 1<=y<=3:print(int((4-y)*1e5)) else:print(0)
[ "literal.number.float.change", "call.arguments.change", "io.output.change" ]
658,135
658,136
u580093517
python
p02853
s = 0 for i in map(int, input().split()): if i == 1: s+=300000 elif i ==2 : s+= 200000 elif i ==3 : s+= 100000 if s== 600000: s == 1000000 print(s)
s = 0 for i in map(int, input().split()): if i == 1: s+=300000 elif i ==2 : s+= 200000 elif i ==3 : s+= 100000 if s== 600000: s = 1000000 print(s)
[ "expression.operation.compare.replace.remove", "assignment.replace.add", "misc.typo" ]
658,139
658,140
u064027771
python
p02853
X,Y = map(int,input().split()) if X < 4: X = (4-X)*100000 else: X = 0 if Y < 4: Y = (4-Y)*100000 else: Y = 0 if X == 1 and Y == 1: print(X+Y+400000) else: print(X+Y)
X,Y = map(int,input().split()) if X < 4: X = (4-X)*100000 else: X = 0 if Y < 4: Y = (4-Y)*100000 else: Y = 0 if X == 300000 and Y == 300000: print(X+Y+400000) else: print(X+Y)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
658,143
658,144
u503111914
python
p02853
h = list(map(int, input().split())) a = 0 for i in range(2): if h[i] << 4: a = a + 100000 * (4-h[i]) if h[0] == 1 and h[1] == 1: a = a + 400000 print(a)
h = list(map(int, input().split())) a = 0 for i in range(2): if h[i] <= 3: a = a + 100000 * (4-h[i]) if h[0] == 1 and h[1] == 1: a = a + 400000 print(a)
[ "control_flow.loop.for.condition.change" ]
658,149
658,150
u660245210
python
p02853
X,Y = map(int,input().split()) X_aaa=0 Y_aaa=0 if X ==1 and Y ==1: print(1000000) exit() elif X==1 : X_aaa+=300000 elif X==2 : X_aaa+=200000 elif X==3 : X_aaa+=100000 elif Y==1 : Y_aaa+=300000 elif Y==2 : Y_aaa+=200000 elif Y==3 : Y_aaa+=100000 print(X_aaa+Y_aaa)
X,Y = map(int,input().split()) X_aaa=0 Y_aaa=0 if X ==1 and Y ==1: print(1000000) exit() if X==1 : X_aaa+=300000 elif X==2 : X_aaa+=200000 elif X==3 : X_aaa+=100000 if Y==1 : Y_aaa+=300000 elif Y==2 : Y_aaa+=200000 elif Y==3 : Y_aaa+=100000 print(X_aaa+Y_aaa)
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
658,157
658,158
u024245528
python
p02853
X, Y = map(int, input().split()) a = 0 if X == 1: a += 300000 elif X == 2: a += 200000 elif X == 3: a += 10000 if Y == 1: a += 300000 elif Y == 2: a += 200000 elif Y == 3: a += 100000 if X == 1 and Y == 1: a += 400000 print(a)
X, Y = map(int, input().split()) a = 0 if X == 1: a += 300000 elif X == 2: a += 200000 elif X == 3: a += 100000 if Y == 1: a += 300000 elif Y == 2: a += 200000 elif Y == 3: a += 100000 if X == 1 and Y == 1: a += 400000 print(a)
[ "literal.number.integer.change" ]
658,166
658,167
u640123177
python
p02853
X, Y = map(int, input().split()) ans = 0 if X < 4: ans += (4 - X) * 10**5 if Y < 4: ans += (4 - X) * 10**5 if X == 1 and Y == 1: ans += 4 * 10**5 print(ans)
X, Y = map(int, input().split()) ans = 0 if X < 4: ans += (4 - X) * 10**5 if Y < 4: ans += (4 - Y) * 10**5 if X == 1 and Y == 1: ans += 4 * 10**5 print(ans)
[ "identifier.change", "expression.operation.binary.change" ]
658,170
658,171
u463858127
python
p02854
import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) total = sum(A) total *= 2 mindif = 1e12 sub = 0 for i in range(N): sub += 2 * A[i] dif = abs(total//2-sub) if dif < mindif: mindif = dif else: break print(mindif)
import sys input = sys.stdin.readline N=int(input()) A=list(map(int,input().split())) total = sum(A) total *= 2 mindif = 1e12 sub = 0 for i in range(N): sub += 2 * A[i] dif = abs(total//2-sub) if dif < mindif: mindif = dif print(mindif)
[ "control_flow.break.remove" ]
658,178
658,179
u840037795
python
p02854
n = int(input()) l = list(map(int,input().split())) from itertools import accumulate tot=sum(l) ans=10**9+7 for i in list(accumulate(l)): if i <= tot//2: ans=min(ans, abs(tot-(i*2))) for i in list(accumulate(l[::-1])): if i <= tot//2: ans=min(ans, abs(tot--(i*2))) print(ans)
n = int(input()) l = list(map(int,input().split())) from itertools import accumulate tot=sum(l) ans=2020202020*100000 for i in list(accumulate(l)): if i <= tot//2: ans=min(ans, abs(tot-(i*2))) for i in list(accumulate(l[::-1])): if i <= tot//2: ans=min(ans, abs(tot-(i*2))) print(ans)
[ "expression.operation.binary.remove", "expression.operation.unary.arithmetic.remove", "call.arguments.change" ]
658,190
658,189
u680851063
python
p02854
from itertools import accumulate n = int(input()) a = list(map(int, input().split())) cumsum = list(accumulate(a)) total = cumsum[-1] ans = 10*20 for left in cumsum: right = total - left ans = min(ans, abs(left - right)) print(ans)
from itertools import accumulate n = int(input()) a = list(map(int, input().split())) cumsum = list(accumulate(a)) total = cumsum[-1] ans = 10**20 for left in cumsum: right = total - left ans = min(ans, abs(left - right)) print(ans)
[ "assignment.value.change", "expression.operation.binary.change" ]
658,191
658,192
u687574784
python
p02854
n=int(input()) a=list(map(int,input().split())) harf=sum(a)//2 l,r,i=0,a[0],0 while r<harf: i+=1 l=r r+=a[i] print(min(harf-l,r-harf))
n=int(input()) a=list(map(int,input().split())) harf=sum(a)/2 l,r,i=0,a[0],0 while r<harf: i+=1 l=r r+=a[i] print(int(min(harf-l,r-harf)*2))
[ "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change", "call.add", "call.arguments.change" ]
658,206
658,207
u131881594
python
p02854
import sys import collections import bisect def main(): n = int(input()) AList = list(map(int, input().split())) ASum = sum(a) c = 0 for i in range(n): c += AList[i] if c >= ASum / 2: k = i break ans = min(2 * c - ASum, ASum - 2 * c + 2 * AList[k]) p...
import sys import collections import bisect def main(): n = int(input()) AList = list(map(int, input().split())) ASum = sum(AList) c = 0 for i in range(n): c += AList[i] if c >= ASum / 2: k = i break ans = min(2 * c - ASum, ASum - 2 * c + 2 * AList[k]) ...
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
658,223
658,224
u395202850
python
p02854
n=int(input()) A=list(map(int,input().split())) m=float('INF') sa=[] for i,a in enumerate(A): sa.append(sa[i]+ai) for i in range(n+1): ans=min(ans,abs(sa[i]-(sa[-1]-sa[i]))) print(ans)
n=int(input()) A=list(map(int,input().split())) ans=float('INF') sa=[0] for i,a in enumerate(A): sa.append(sa[i]+a) for i in range(n+1): ans=min(ans,abs(sa[i]-(sa[-1]-sa[i]))) print(ans)
[ "assignment.variable.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
658,225
658,226
u694665829
python
p02854
n = int(input()) a = list(map(int, input().split())) x = n//2 if sum(a)/2 == sum(a[:(n//2)]): print(0) elif sum(a)/2 >= sum(a[:(n//2)]): while sum(a)/2 >= sum(a[:x]): x += 1 print(min(abs(2*sum(a[:x])-sum(a)), abs(2*sum(a[:x-1])-sum(a)))) else: while sum(a)/2 <= sum(a[:x]): x -= 1 print(min(abs(2*s...
n = int(input()) a = list(map(int, input().split())) x = n//2 if sum(a)/2 == sum(a[:(n//2)]): print(0) elif sum(a)/2 >= sum(a[:(n//2)]): while sum(a)/2 >= sum(a[:x]): x += 1 print(min(abs(2*sum(a[:x])-sum(a)), abs(2*sum(a[:x-1])-sum(a)))) else: while sum(a)/2 <= sum(a[:x]): x -= 1 print(min(abs(2*s...
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
658,259
658,260
u791110052
python
p02854
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): retur...
import sys import math import itertools import bisect from copy import copy from collections import deque,Counter from decimal import Decimal def s(): return input() def i(): return int(input()) def S(): return input().split() def I(): return map(int,input().split()) def L(): return list(input().split()) def l(): retur...
[ "call.remove" ]
658,269
658,270
u514118270
python
p02854
n=int(input()) a=list(map(int,input().split())) temp=sum(a) ans=0 t=999999999 tsum=0 ta=0 for i in range(n): tsum=tsum+a[i] if abs(tsum-temp/2)<t: t=abs(tsum-temp/2) ta=tsum print(int(ta)*2-temp)
n=int(input()) a=list(map(int,input().split())) temp=sum(a) ans=0 t=9999999999999999 tsum=0 ta=0 for i in range(n): tsum=tsum+a[i] if abs(tsum-temp/2)<t: t=abs(tsum-temp/2) ta=tsum print(abs(int(ta)*2-temp))
[ "literal.number.integer.change", "assignment.value.change", "call.add", "call.arguments.change" ]
658,275
658,274
u629350026
python
p02854
n=int(input()) a=list(map(int,input().split())) sm=sum(a) x=[a[0]] y=[sm-a[n-1]] for i in range(1,n): x.append(x[i-1]+a[i]) y.append(sm-x[i]) min=9999999999 for (p,q) in zip(x,y): sa=abs(p-q) if sa<min: min=sa print(min)
n=int(input()) a=list(map(int,input().split())) sm=sum(a) x=[a[0]] y=[sm-a[0]] for i in range(1,n): x.append(x[i-1]+a[i]) y.append(sm-x[i]) min=9999999999 for (p,q) in zip(x,y): sa=abs(p-q) if sa<min: min=sa print(min)
[ "assignment.value.change", "identifier.replace.remove", "literal.replace.add", "variable_access.subscript.index.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
658,278
658,279
u168416324
python
p02854
N = int(input()) A = list(map(int,input().split())) almost_half = sum(A)/2 former = 0 for n in range(N): former += A[n] if former == almost_half: print(0) break if former > almost_half: if n == 0: print(abs(A[0]-sum(A[1:]))) break elif n == N-1: print(abs(A[n]-sum(A[:n])))...
N = int(input()) A = list(map(int,input().split())) almost_half = sum(A)/2 former = 0 for n in range(N): former += A[n] if former == almost_half: print(0) break if former > almost_half: if n == 0: #print("case01",n,former) print(abs(A[0]-sum(A[1:]))) break elif n == N-1: ...
[ "misc.opposites", "expression.operator.arithmetic.change", "variable_access.subscript.index.change", "call.arguments.change", "expression.operation.binary.change" ]
658,287
658,288
u760961723
python
p02854
n = int(input()) a = [int(i) for i in input().split()] b = [] sum_a = sum(a) cum = 0 for i in a: cum += i b.append(sum_a - cum) print(min(b))
n = int(input()) a = [int(i) for i in input().split()] b = [] sum_a = sum(a) cum = 0 for i in a: cum += i b.append(abs(sum_a - cum * 2)) print(min(b))
[ "call.add", "call.arguments.add" ]
658,306
658,307
u091051505
python
p02854
import numpy as np N = int(input()) A = np.array(list(map(int, input().split()))) A_cs = A.cumsum() A_cs = A_cs - A_cs[-1]/2 div = np.abs(A_cs).argmin() print(abs(A[:div+1].sum - A[div+1:].sum()))
import numpy as np N = int(input()) A = np.array(list(map(int, input().split()))) A_cs = A.cumsum() A_cs = A_cs - A_cs[-1]/2 div = np.abs(A_cs).argmin() print(abs(A[:div+1].sum() - A[div+1:].sum()))
[ "call.add" ]
658,333
658,334
u860002137
python
p02854
import sys input = sys.stdin.readline def main(): n = int(input()) stick = list(map(int, input().split())) total = sum(stick) mid = total // 2 cum = 0 midi = 0 for i, block in enumerate(stick): cum += block if cum >= mid: midi = i break l1 = c...
import sys input = sys.stdin.readline def main(): n = int(input()) stick = list(map(int, input().split())) total = sum(stick) mid = total // 2 cum = 0 midi = 0 for i, block in enumerate(stick): cum += block if cum >= mid: midi = i break l1 = c...
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "expression.operation.binary.change" ]
658,336
658,337
u560867850
python
p02854
# -*- coding: utf-8 -*- import sys import fractions import copy import bisect import math import numpy as np import itertools from itertools import combinations_with_replacement #import math#数学的計算はこれでいける。普通に0.5乗しても計算可能 #w=input() from operator import itemgetter from sys import stdin #input = sys.stdin.readline#こっちの方が入...
# -*- coding: utf-8 -*- import sys import fractions import copy import bisect import math import numpy as np import itertools from itertools import combinations_with_replacement #import math#数学的計算はこれでいける。普通に0.5乗しても計算可能 #w=input() from operator import itemgetter from sys import stdin #input = sys.stdin.readline#こっちの方が入...
[]
658,360
658,361
u007886915
python
p02854
N = int(input()) A = list(map(int, input().split())) tmp = [0 for i in range(N+1)] length = 0 for i in range(N): tmp[i+1] = tmp[i] + A[i] length += A[i] ans = 0 for i in range(1, N+1): ans = min(ans, abs((length - tmp[i]) - tmp[i])) print(ans)
N = int(input()) A = list(map(int, input().split())) tmp = [0 for i in range(N+1)] length = 0 for i in range(N): tmp[i+1] = tmp[i] + A[i] length += A[i] ans = 10 ** 10 for i in range(1, N+1): ans = min(ans, abs((length - tmp[i]) - tmp[i])) print(ans)
[ "literal.number.integer.change", "assignment.value.change" ]
658,381
658,382
u411858517
python
p02854
n=int(input()) l=list(map(int,input().split())) count=0 suml=sum(l) i=0 while count<suml/2: count+=l[i] i+=1 k=suml/2 a=l[i] if count==k: print(0) else: print(int(2*(min(count-k,a-count+k))))
n=int(input()) l=list(map(int,input().split())) count=0 suml=sum(l) i=0 while count<suml/2: count+=l[i] i+=1 k=suml/2 a=l[i-1] if count==k: print(0) else: print(int(2*(min(count-k,a-count+k))))
[ "assignment.change" ]
658,387
658,388
u272525952
python
p02854
n = int(input()) a = list(map(int, input().split())) for i in range(1, n): a[i] += a[i - 1] ans = n for x in a[:n-1]: ans = min(ans, abs(a[n-1] - 2 * x)) print(ans)
n = int(input()) a = list(map(int, input().split())) for i in range(1, n): a[i] += a[i - 1] ans = a[n-1] for x in a[:n-1]: ans = min(ans, abs(a[n-1] - 2 * x)) print(ans)
[]
658,389
658,390
u706786134
python
p02854
N=int(input()) A=list(map(int,input().split())) s=ans=sum(A) k=0 for i in range(N-1): k+=A[i] ans=min(ans,abs(s-2*k)) print(k,ans) print(ans)
N=int(input()) A=list(map(int,input().split())) s=ans=sum(A) k=0 for i in range(N-1): k+=A[i] ans=min(ans,abs(s-2*k)) print(ans)
[ "call.remove" ]
658,438
658,439
u539281377
python
p02854
import numpy as np import bisect n = int(input()) A = list(map(int,input().split())) cs = np.cumsum(A).tolist() mid = sum(A)//2 idx = bisect.bisect_left(cs, mid) ans = float('inf') for i in range(max(1, idx-1), min(idx+2, n)): x = A[:i] y = A[i:] print(x,y) sum_x = sum(x) sum_y = sum(y) ans = mi...
import numpy as np import bisect n = int(input()) A = list(map(int,input().split())) cs = np.cumsum(A).tolist() mid = sum(A)//2 idx = bisect.bisect_left(cs, mid) ans = float('inf') for i in range(max(1, idx-1), min(idx+2, n)): x = A[:i] y = A[i:] sum_x = sum(x) sum_y = sum(y) ans = min(ans, abs(sum_...
[ "call.remove" ]
658,440
658,441
u672475305
python
p02854
n = int(input()) A = list(map(int, input().split())) ca = [0] for i in range(n): ca.append(A[i]+ca[i]) print(ca) ans = 2020202020 for i in range(n): ans = min(ans, abs(ca[i]-(ca[-1]-ca[i]))) print(ans)
n = int(input()) A = list(map(int, input().split())) ca = [0] for i in range(n): ca.append(A[i]+ca[i]) ans = 2020202020 for i in range(n): ans = min(ans, abs(ca[i]-(ca[-1]-ca[i]))) print(ans)
[ "call.remove" ]
658,442
658,443
u189487046
python
p02854
def main(): import sys import bisect n = int(input()) a = list(map(int, sys.stdin.readline().split())) b = list(accumulate(a)) l = b[-1] i = bisect.bisect(b, l // 2) ans = min(abs(l - 2 * b[i - 1]), abs(l - 2 * b[i])) print(ans) if __name__ == '__main__': main()
def main(): import sys import bisect from itertools import accumulate n = int(input()) a = list(map(int, sys.stdin.readline().split())) b = list(accumulate(a)) l = b[-1] i = bisect.bisect(b, l // 2) ans = min(abs(l - 2 * b[i - 1]), abs(l - 2 * b[i])) print(ans) if __name__ ==...
[]
658,450
658,451
u127499732
python
p02854
def main(): import sys import bisect from itertools import accumulate n = int(input()) a = list(map(int, sys.stdin.readline().split())) b = list(accumulate(a)) l = b[-1] i = bisect.bisect_left(b, l // 2) ans = min(abs(l - 2 * b[i]), abs(l - 2 * b[i + 1])) print(ans) if __name...
def main(): import sys import bisect from itertools import accumulate n = int(input()) a = list(map(int, sys.stdin.readline().split())) b = list(accumulate(a)) l = b[-1] i = bisect.bisect(b, l // 2) ans = min(abs(l - 2 * b[i - 1]), abs(l - 2 * b[i])) print(ans) if __name__ ==...
[ "assignment.value.change", "identifier.change", "expression.operation.binary.remove" ]
658,452
658,451
u127499732
python
p02854
# Problem B - Iron Bar cutting # input process N = int(input()) a_list = list(map(int, input().split())) # initialization min_cost = 10*18 left_sum = 0 right_sum = sum(a_list) # count process cumulative sum for i in range(N-1): left_sum += a_list[i] right_sum -= a_list[i] distance = abs(left_sum - right_...
# Problem B - Iron Bar cutting # input process N = int(input()) a_list = list(map(int, input().split())) # initialization min_cost = 10**18 left_sum = 0 right_sum = sum(a_list) # count process cumulative sum for i in range(N-1): left_sum += a_list[i] right_sum -= a_list[i] distance = abs(left_sum - right...
[ "assignment.value.change", "expression.operation.binary.change" ]
658,459
658,460
u368249389
python