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
p02658
import sys n=int(input()) l=list(map(int,input().split())) if 0 in l: print(21) sys.exit() flg=False a = 1 for i in l: a *= i if a>10e17: flg=True break if flg: print(-1) else: print(a)
import sys n=int(input()) l=list(map(int,input().split())) if 0 in l: print(0) sys.exit() flg=False a = 1 for i in l: a *= i if a>10e17: flg=True break if flg: print(-1) else: print(a)
[ "literal.number.integer.change", "call.arguments.change", "io.output.change" ]
374,586
374,587
u943786281
python
p02658
import array n = int(input()) a=[] a=input().split(" ") f=0 f1=0 b=0 for i in a: if int(i) == 0: print("0"); f1=1 sum =1 if f1==0: for i in a: sum=sum*int(i); if sum>1e18: f=1 print("-1"); if f==0 and f1==0: print(sum)
import array n = int(input()) a=[] a=input().split(" ") f=0 f1=0 b=0 for i in a: if int(i) == 0: print("0") f1=1 break sum =1 if f1==0: for i in a: sum=sum*int(i) if sum>1e18: f=1 print("-1") break if f==0 and f1==0: ...
[ "control_flow.break.add" ]
374,597
374,598
u399195724
python
p02658
n = int(input()) a = list(map(int,input().split())) if 0 in a: print(0) else: p = 1 f = True for i in a: p *= i if(p > 1000000000000000000): f = false break if(f): print(p) else: print(-1)
n = int(input()) a = list(map(int,input().split())) if 0 in a: print(0) else: p = 1 f = True for i in a: p *= i if(p > 1000000000000000000): f = False break if(f): print(p) else: print(-1)
[ "assignment.value.change" ]
374,601
374,602
u132589242
python
p02658
n = int(input()) a = list(map(int, input().split())) a.sort() if a[0] == 0: print(0) exit(0) ans = 1 for i in a: ans *= i print(i, ans) if (ans > 1e18): print(-1) exit(0) print(ans)
n = int(input()) a = list(map(int, input().split())) a.sort() if a[0] == 0: print(0) exit(0) ans = 1 for i in a: ans *= i if (ans > 1e18): print(-1) exit(0) print(ans)
[ "call.remove" ]
374,609
374,610
u772304668
python
p02658
import sys input = sys.stdin.readline def main(): N = int(input()) A = sorted([int(v) for v in input().split()], reverse=True) over = False ans = 1 for a in A: ans *= a if ans > 1e18: over = True break if over: print(-1) else: pr...
import sys input = sys.stdin.readline def main(): N = int(input()) A = sorted([int(v) for v in input().split()]) over = False ans = 1 for a in A: ans *= a if ans > 1e18: over = True break if over: print(-1) else: print(ans) if _...
[ "call.arguments.change" ]
374,637
374,638
u538817603
python
p02658
import sys input = sys.stdin.readline def main(): N = int(input()) A = [int(v) for v in input().split()] over = False ans = 1 for a in A: ans *= a if ans > 1e18: over = True break if over: print(-1) else: print(ans) if __name__ ...
import sys input = sys.stdin.readline def main(): N = int(input()) A = sorted([int(v) for v in input().split()]) over = False ans = 1 for a in A: ans *= a if ans > 1e18: over = True break if over: print(-1) else: print(ans) if _...
[ "call.add", "call.arguments.change" ]
374,639
374,638
u538817603
python
p02658
n = int(input()) c = list(map(int, input().split())) ans=1 max =10**18 if 0 in c: ans =0 else: for i in range(n): if ans< max: ans=ans*c[i] if ans >= max: ans =-1 break else: ans = -1 break print(ans)
n = int(input()) c = list(map(int, input().split())) ans=1 max =10**18 if 0 in c: ans =0 else: for i in range(n): if ans< max: ans=ans*c[i] if ans > max: ans =-1 break else: ans = -1 break print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,644
374,645
u016336953
python
p02658
n=int(input()) a=list(map(int,input().split())) a.sort() for i in range(n): ans*=a[i] if ans>10**18: print(-1) break else: print(ans)
n=int(input()) a=list(map(int,input().split())) a.sort() ans=1 for i in range(n): ans*=a[i] if ans>10**18: print(-1) break else: print(ans)
[ "assignment.add" ]
374,659
374,660
u079022693
python
p02658
n,*a=map(int,open(0).read().split()) a.sort() for i in a: s *= i if s > 1e18: print(-1) exit() print(s)
n,*a=map(int,open(0).read().split()) a.sort() s=1 for i in a: s *= i if s > 1e18: print(-1) exit() print(s)
[ "assignment.add" ]
374,667
374,668
u094999522
python
p02658
n,*a=map(int,open(0).read().split()) s=1 if 0 in a: print(0) exit() for i in a: s*=a if s > 10**18: print(-1) exit() print(s)
n,*a=map(int,open(0).read().split()) s=1 if 0 in a: print(0) exit() for i in a: s*=i if s > 1e18: print(-1) exit() print(s)
[ "identifier.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
374,669
374,670
u094999522
python
p02658
n,*a=map(int,open(0).read().split()) s=1 if 0 in a: print(0) exit() for i in a: s*=i if s >= 10**18: print(-1) exit() print(s)
n,*a=map(int,open(0).read().split()) s=1 if 0 in a: print(0) exit() for i in a: s*=i if s > 1e18: print(-1) exit() print(s)
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
374,671
374,670
u094999522
python
p02658
num = int(input()) str2 = input().split(" ") nums = [int(s) for s in str2] nums.sort() for i in range(len(nums)): ans = ans * nums[i] if(ans > 1000000000000000000): print(-1) quit() print(ans) quit()
num = int(input()) str2 = input().split(" ") nums = [int(s) for s in str2] nums.sort() ans = 1 for i in range(len(nums)): ans = ans * nums[i] if(ans > 1000000000000000000): print(-1) quit() print(ans)
[ "call.remove" ]
374,681
374,682
u087470052
python
p02658
N = int(input()) MX = 10**18 a = list(map(int, input().split())) if 0 in a: print(0) exit(0) ans = 1 for x in a: ans *= x if ans > MX: print(0) exit(0) print(ans)
N = int(input()) MX = 10**18 a = list(map(int, input().split())) if 0 in a: print(0) exit(0) ans = 1 for x in a: ans *= x if ans > MX: print(-1) exit(0) print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.add" ]
374,695
374,696
u315133903
python
p02658
n = int(input()) mx = 10**18 a = list(map(int, input().split())) for x in a: if x == 0: print(0) exit(0) ans = 1 for x in a: ans *= a if ans > mx: print(-1) exit(0) print(ans)
n = int(input()) mx = 10**18 a = list(map(int, input().split())) for x in a: if x == 0: print(0) exit(0) ans = 1 for x in a: ans *= x if ans > mx: print(-1) exit(0) print(ans)
[ "identifier.change" ]
374,711
374,712
u944545272
python
p02658
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): n = int(input()) a = list(map(int, readline().split())) cur = 1 for x in a: cur *= x if cur > 10 ** 18: print(-1) sys.exit() print(cur...
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): n = int(input()) a = list(map(int, readline().split())) a.sort() cur = 1 for x in a: cur *= x if cur > 10 ** 18: print(-1) sys.exit...
[ "call.add" ]
374,755
374,756
u261103969
python
p02658
#B n = int(input()) a = list(map(int,input().split())) flg = True a.sort if a[0] == 0: print(0) else: result = a[0] for i in range(1,n): result *= a[i] if result > 10**18: print(-1) flg = False break if flg: print(result)
#B n = int(input()) a = list(map(int,input().split())) flg = True a.sort() if a[0] == 0: print(0) else: result = a[0] for i in range(1,n): result *= a[i] if result > 10**18: print(-1) flg = False break if flg: print(result)
[ "call.add" ]
374,771
374,772
u771007149
python
p02658
import numpy as np n = int(input()) a = list(map(int, input().split())) b = np.array(a) temp = 1 if a.count(0) >0: print(0) exit() for i in range(n): temp = b[i] * temp if temp > 10**18 or temp < 0: print('-1') exit() print(temp)
import numpy as np from decimal import * n = int(input()) a = list(map(Decimal, input().split())) b = np.array(a) temp = 1 if a.count(0) >0: print(0) exit() for i in range(n): temp = b[i] * temp if temp > 10**18 or temp < 0: print('-1') exit() print(temp)
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
374,777
374,778
u712029088
python
p02658
n=int(input()) a=list(map(int,input().split())) ans=1 if 0 in a: print(0) exit() for i in a: ans*=i if ans > (10**18): ans=-1 print(ans)
n=int(input()) a=list(map(int,input().split())) ans=1 if 0 in a: print(0) exit() for i in a: ans*=i if ans > (10**18): print(-1) exit() print(ans)
[ "call.arguments.change", "call.add" ]
374,783
374,784
u497326082
python
p02658
n = int(input()) s = list(map(int,input().split())) if 0 in s: print(0) exit() for _ in range(n): ans *= s[_] if ans > 10**18: print(-1) exit() else: print(ans)
n = int(input()) s = list(map(int,input().split())) ans = 1 if 0 in s: print(0) exit() for _ in range(n): ans *= s[_] if ans > 10**18: print(-1) exit() else: print(ans)
[ "assignment.add" ]
374,791
374,792
u220499476
python
p02658
n = int(input()) A = [int(i) for i in input().split()] if 0 in A: print(0) exit() ans = 1 for i in A: if ans > 10**18 / i: print(-1) exit() else: ans *= i print(ans)
n = int(input()) A = [int(i) for i in input().split()] if 0 in A: print(0) exit() ans = 1 for i in A: if ans > 10**18 // i: print(-1) exit() else: ans *= i print(ans)
[ "expression.operator.arithmetic.change", "control_flow.branch.if.condition.change" ]
374,818
374,819
u154645927
python
p02658
n = int(input()) a = list(map(int, input().split())) count = 1 if 0 in a: print(0) for A in a: count *= A if count > 10**18: print(-1) exit() print(count)
n = int(input()) a = list(map(int, input().split())) count = 1 if 0 in a: print(0) exit() for A in a: count *= A if count > 10**18: print(-1) exit() print(count)
[ "call.add" ]
374,824
374,825
u298376876
python
p02658
# coding: utf-8 # Your code here! def main(): N = int(input()) A = list(map(int,input().split())) if 0 in A: print(0) return ans = 1 for i in range(N): ans *= A[0] if ans > 1000000000000000000: print(-1) return print(ans...
# coding: utf-8 # Your code here! def main(): N = int(input()) A = list(map(int,input().split())) if 0 in A: print(0) return ans = 1 for i in range(N): ans *= A[i] if ans > 1000000000000000000: print(-1) return print(ans...
[ "identifier.replace.add", "literal.replace.remove", "variable_access.subscript.index.change" ]
374,828
374,829
u139235669
python
p02658
def f(n, a): if 0 in a: return 0 p = 1 for x in a: p *= x if p > 10**18: return -1 return p n = int(input()) a = list(int, input().split()) print(f(n, a))
def f(n, a): if 0 in a: return 0 p = 1 for x in a: p *= x if p > 10**18: return -1 return p n = int(input()) a = list(map(int, input().split())) print(f(n, a))
[ "call.arguments.add", "call.arguments.change" ]
374,830
374,831
u086127549
python
p02658
n = int(input()) a = list(map(int ,input().split())) ans = 1 if 0 in a: print(0) exit() for i in range(n): ans *= a[i] if ans > 10**18: print(-1) print(ans)
n = int(input()) a = list(map(int ,input().split())) ans = 1 if 0 in a: print(0) exit() for i in range(n): ans *= a[i] if ans > 10**18: print(-1) exit() print(ans)
[ "call.add" ]
374,838
374,839
u057415180
python
p02658
def main(N): A = list(map(int, input().split())) st_A = set(A) if 0 in st_A: print(0) x = 1 else: for a in A: x *= a if x > 10 ** 18: print(-1) exit() else: print(x) if __name__ == '__main__': N ...
def main(N): A = list(map(int, input().split())) st_A = set(A) if 0 in st_A: print(0) else: x = 1 for a in A: x *= a if x > 10 ** 18: print(-1) exit() else: print(x) if __name__ == '__main__': N ...
[]
374,842
374,843
u894521144
python
p02658
def main(N): A = list(map(int, input().split())) st_A = set(A) if 0 in st_A: print(0) x = 1 for a in A: x *= a if x > 10 ** 18: print(-1) exit() else: print(x) if __name__ == '__main__': N = int(inpu...
def main(N): A = list(map(int, input().split())) st_A = set(A) if 0 in st_A: print(0) else: x = 1 for a in A: x *= a if x > 10 ** 18: print(-1) exit() else: print(x) if __name__ == '__main__': N ...
[]
374,844
374,843
u894521144
python
p02658
# -*- coding: utf-8 -*- n = int(input()) a_li = list(map(int, (input().split()))) product = 1 if 0 in a_li: product = 0 else: for i in a_li: product *= i if product > 10**18: product = -1 exit() print(product)
# -*- coding: utf-8 -*- n = int(input()) a_li = list(map(int, (input().split()))) product = 1 if 0 in a_li: product = 0 else: for i in a_li: product *= i if product > 10**18: print(-1) exit() print(product)
[ "call.arguments.change" ]
374,857
374,858
u317485668
python
p02658
# -*- coding: utf-8 -*- n = int(input()) a_li = list(map(int, (input().split()))) product = 1 if 0 in a_li: product = 0 else: for i in a_li: product *= i if product > 10**18: product = -1 break break print(product)
# -*- coding: utf-8 -*- n = int(input()) a_li = list(map(int, (input().split()))) product = 1 if 0 in a_li: product = 0 else: for i in a_li: product *= i if product > 10**18: print(-1) exit() print(product)
[ "call.add" ]
374,859
374,858
u317485668
python
p02658
n,*a=map(open(0).read().split()) if 0 in a: print(0) exit() s=1 for i in a: s*=i if s>10**18: print(-1) exit() print(s)
n,*a=map(int,open(0).read().split()) if 0 in a: print(0) exit() s=1 for i in a: s*=i if s>10**18: print(-1) exit() print(s)
[ "call.arguments.add" ]
374,871
374,872
u568576853
python
p02658
n = int(input()) a = list(map(int,input().split())) new = 1 if 0 in a: print(0) exit() for i in a: new *= a if new > (10**18): new = -1 break print(new)
n = int(input()) a = list(map(int,input().split())) new = 1 if 0 in a: print(0) exit() for i in a: new *= i if new > (10**18): new = -1 break print(new)
[ "identifier.change" ]
374,877
374,878
u099187672
python
p02658
import sys n=int(input()) m=list(map(int,input().split())) ans=1 if 0 in m: print(0) sys.exit() for i in range(n): ans=ans*m[i] print(ans) if ans>pow(10,18): print(-1) sys.exit() if ans <=pow(10,18): print(ans)
import sys n=int(input()) m=list(map(int,input().split())) ans=1 if 0 in m: print(0) sys.exit() for i in range(n): ans=ans*m[i] if ans>pow(10,18): print(-1) sys.exit() if ans<=pow(10,18): print(ans)
[ "call.remove" ]
374,886
374,887
u061518317
python
p02658
n = int(input()) a= input().split() level = pow(10, 18) product = 1 if 0 in a: print(0) else: for num in range(n): product *= int(a[num]) if product > level: print("-1") break if product <= level: print(product)
n = int(input()) a= input().split() level = pow(10, 18) product = 1 if "0" in a: print(0) else: for num in range(n): product *= int(a[num]) if product > level: print("-1") break if product <= level: print(product)
[ "control_flow.branch.if.condition.change" ]
374,891
374,892
u393023395
python
p02658
n = int(input()) a = list(map(int, input().split())) b = [i for i in a if i != 1] ans = 1 if len(b) < 1000: for i in range(len(b)): ans *= a[i] else: ans = 10**18+1 if 0 in b: ans = 0 print(ans if ans <= 10**18 else '-1')
n = int(input()) a = list(map(int, input().split())) b = [i for i in a if i != 1] ans = 1 if len(b) < 100: for i in range(len(b)): ans *= b[i] else: ans = 10**18+1 if 0 in b: ans = 0 print(ans if ans <= 10**18 else '-1')
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "identifier.change" ]
374,895
374,896
u010178026
python
p02658
import collections N = int(input()) cNum = collections.Counter(list(map(int, input().split()))) ans = 1 if cNum[0] != 0: print("0") exit() for n in cNum.keys(): ans *= n**cNum[n] if ans > 10**8: ans = -1 break print(ans)
import collections N = int(input()) cNum = collections.Counter(list(map(int, input().split()))) ans = 1 if cNum[0] != 0: print("0") exit() for n in cNum.keys(): ans *= n**cNum[n] if ans > 10**18: ans = -1 break print(ans)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
374,899
374,900
u909514237
python
p02658
n = int(raw_input()) lst = list(map(int, raw_input().strip().split()))[:n] mx = 1000000000000000000 if 0 in lst: print(0) else: cur = lst[0] for x in lst[1:]: cur = cur * x if cur > mx: cur = -1 break print(cur)
n = int(input()) lst = list(map(int, input().strip().split()))[:n] mx = 1000000000000000000 if 0 in lst: print(0) else: cur = lst[0] for x in lst[1:]: cur = cur * x if cur > mx: cur = -1 break print(cur)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
374,905
374,906
u931154139
python
p02658
def fun(A): for i in A: if i == 0: return -1 ans = 1 for i in A: ans = ans*i if(ans > 1000000000000000000): return -1 return ans N = int(input()) A = list(map(int, input().split())) print(fun(A))
def fun(A): for i in A: if i == 0: return 0 ans = 1 for i in A: ans = ans*i if(ans > 1000000000000000000): return -1 return ans N = int(input()) A = list(map(int, input().split())) print(fun(A))
[ "function.return_value.change", "expression.operation.unary.remove" ]
374,909
374,910
u391763659
python
p02658
n=int(input()) l=list(map(int,input().split())) z,flag=1,0 m=10**18 mi=min(l) if mi==0: print(0) else: for i in l: z*=i print(z) if z>m: flag=1 break if flag==1: print(-1) else: print(z)
n=int(input()) l=list(map(int,input().split())) z,flag=1,0 m=10**18 mi=min(l) if mi==0: print(0) else: for i in l: z*=i if z>m: flag=1 break if flag==1: print(-1) else: print(z)
[ "call.remove" ]
374,915
374,916
u776134564
python
p02658
def multiplyList(myList) : # Multiply elements one by one result = 1 for x in myList: result = result * x if result == 0: return 0 if result > 10**18: return -1 return result n = int(input()) l = list(map(int, input().split())) res = multi...
def multiplyList(myList) : # Multiply elements one by one result = 1 for x in myList: result = result * x if result == 0: return 0 if result > 10**18: return -1 return result n = int(input()) l = list(map(int, input().split())) l.sort() res ...
[ "call.add" ]
374,931
374,932
u538771894
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 keta = 0 if 0 in A: print(0) exit() for x in A: ans *= x keta += len(str(x)) if keta > 20: print(-1) exit() print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 keta = 0 if 0 in A: print(0) exit() for x in A: ans *= x keta += len(str(x)) if ans > 1000000000000000000: print(-1) exit() print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change", "literal.number.integer.change" ]
374,937
374,938
u449863068
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 keta = 0 if 0 in A: print(0) exit() for x in A: ans *= x keta += len(str(x)) if keta > 18: print(-1) exit() print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 keta = 0 if 0 in A: print(0) exit() for x in A: ans *= x keta += len(str(x)) if ans > 1000000000000000000: print(-1) exit() print(ans)
[ "identifier.change", "control_flow.branch.if.condition.change", "literal.number.integer.change" ]
374,939
374,938
u449863068
python
p02658
n = int(input()) a = list(map(int,input().split())) ans = a[0] for i in range(n): if i == 0: print(0) exit() for i in range(1, n): ans = ans * a[i] if ans > 10**18: print(-1) exit() print(ans)
n = int(input()) a = list(map(int,input().split())) ans = a[0] for i in range(n): if a[i] == 0: print(0) exit() for i in range(1, n): ans = ans * a[i] if ans > 10**18: print(-1) exit() print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
374,943
374,944
u265118937
python
p02658
N = int(input()) temp = input() temp = temp.split(" ") arr = [] prod=1 for i in range(N): arr.append(int(temp[i])) flag=0 for i in range(N): prod = prod*arr[i] if prod>1000000000000000000: flag=1 break if flag==0: print(prod) else: print(-1)
N = int(input()) temp = input() temp = temp.split(" ") arr = [] prod=1 for i in range(N): arr.append(int(temp[i])) arr.sort() flag=0 for i in range(N): prod = prod*arr[i] if prod>1000000000000000000: flag=1 break if flag==0: print(prod) else: print(-1)
[ "call.add" ]
374,945
374,946
u368566261
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 for i in range (0, N): if A[i] == 0: ans = 0 break else: ans *= A[i] if ans > 10 ** 18: ans = -1 continue print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 for i in range (0, N): if A[i] == 0: ans = 0 break else: if ans > 0: ans *= A[i] if ans > 10 ** 18: ans = -1 print(ans)
[ "control_flow.branch.if.add" ]
374,949
374,948
u787315667
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 for i in range (0, N): if A[i] == 0: ans = 0 break else: ans *= A[i] if ans > 10 ** 18: ans = -1 break print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 for i in range (0, N): if A[i] == 0: ans = 0 break else: if ans > 0: ans *= A[i] if ans > 10 ** 18: ans = -1 print(ans)
[ "control_flow.branch.if.add", "control_flow.break.remove" ]
374,950
374,948
u787315667
python
p02658
import math import sys import functools import operator n = int(input()) a = list(map(int, input().split())) ans = 1 INF = 1000000000000000000 if (0 in a): print(-1) sys.exit() for i in a: ans *= i if(ans > INF): print(-1) sys.exit() print(ans)
import math import sys import functools import operator n = int(input()) a = list(map(int, input().split())) ans = 1 INF = 1000000000000000000 if (0 in a): print(0) sys.exit() for i in a: ans *= i if(ans > INF): print(-1) sys.exit() print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
374,961
374,960
u625920333
python
p02658
N = int(input()) A = list(map(int, input().split())) A = sorted(A,reverse=True) B = 1 if 0 in A: print(0) quit() else: for i in A: B = B*i if B>= 10**18: print(-1) quit() print(B)
N = int(input()) A = list(map(int, input().split())) A = sorted(A,reverse=True) B = 1 if 0 in A: print(0) quit() else: for i in A: B *= i if B> 10**18: print(-1) quit() print(B)
[ "assignment.compound.arithmetic.replace.add", "expression.operator.arithmetic.replace.remove", "expression.operation.binary.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,962
374,963
u718765445
python
p02658
N=int(input()) X=list(map(int,input().split())) result=1 for i in X: result*=i if result>10**18: result=-1 for i in X: if i==0:result=0 print(result)
N=int(input()) X=list(map(int,input().split())) result=1 for i in X: result*=i if result>10**18: result=-1 break for i in X: if i==0:result=0 print(result)
[ "control_flow.break.add" ]
374,970
374,971
u608007704
python
p02658
n = int(input()) a = list(map(int, input().split())) ch = 0 for i in a: if(i == 0): print(0) ch1 = 1 break if(not ch): ans = 1 ch2 = 0 for i in a: ans*=i if(ans > int(1e18)): print(-1) ch2 = 1 break if(not ch2): print(ans)
n = int(input()) a = list(map(int, input().split())) ch1 = 0 for i in a: if(i == 0): print(0) ch1 = 1 break if(not ch1): ans = 1 ch2 = 0 for i in a: ans*=i if(ans > int(1e18)): print(-1) ch2 = 1 break if(not ch2): print(ans)
[ "assignment.variable.change", "identifier.change", "control_flow.branch.if.condition.change" ]
374,978
374,979
u572782845
python
p02658
n = int(input()) ans = 1 nums = list(map(lambda x : int(x),input().split())) for i in range(n): if nums[i] == 0: ans = 0 else: for k in range(n): ans *= nums[k] if ans > 10**18: ans = -1 break print(ans)
n = int(input()) ans = 1 nums = list(map(lambda x : int(x),input().split())) for i in range(n): if nums[i] == 0: ans = 0 break for k in range(n): ans *= nums[k] if ans > 10**18: ans = -1 break print(ans)
[]
374,983
374,984
u528303485
python
p02658
N = int(input()) As = list(map(int, input().split())) if 0 in As: print("0") exit() pi = 1 for A in As: pi*=A if pi>10^18: print("-1") exit() print(str(pi))
N = int(input()) As = list(map(int, input().split())) if 0 in As: print("0") exit() pi = 1 for A in As: pi*=A if pi>1000000000000000000: print("-1") exit() print(str(pi))
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
374,991
374,992
u785618718
python
p02658
# import numpy as np # import math # import copy # from collections import deque import sys input = sys.stdin.readline # sys.setrecursionlimit(10000) # from numba import njit def main(): N = int(input()) A = list(map(int,input().split())) Aset = set(A) if 0 in Aset: print(0) sys.exit...
# import numpy as np # import math # import copy # from collections import deque import sys input = sys.stdin.readline # sys.setrecursionlimit(10000) # from numba import njit def main(): N = int(input()) A = list(map(int,input().split())) Aset = set(A) if 0 in Aset: print(0) sys.exit...
[ "control_flow.break.add" ]
375,002
375,003
u469254913
python
p02658
n = int(input()) An = list(map(int, input().split())) An.sort(reverse=True) ans = An[0] for i in range(1,n): if An[i] == 0: ans = 0 break if An[i] > (10 ** 18): ans = -1 break; if ans > 0: ans = An[0] for i in range(1,n): if An[i] > (10 ** 18): ans = -1 break ans *= An[i] ...
n = int(input()) An = list(map(int, input().split())) An.sort(reverse=True) ans = An[0] for i in range(1,n): if An[i] == 0: ans = 0 break if An[i] > (10 ** 18): ans = -1 break; if ans > 0: ans = An[0] for i in range(1,n): if An[i] > (10 ** 18): ans = -1 break ans *= An[i] ...
[ "control_flow.break.add" ]
375,006
375,007
u683116963
python
p02658
n = int(input()) A = list(map(int, input().split())) ans = 1 flag = True if 0 in A: print(0) flag = False for i in range(n): ans *= A[i] if ans > 10**18: print(-1) flag = False break if flag: print(ans)
n = int(input()) A = list(map(int, input().split())) ans = 1 flag = True if 0 in A: print(0) flag = False if flag: for i in range(n): ans *= A[i] if ans > 10**18: print(-1) flag = False break if flag: print(ans)
[ "control_flow.branch.if.add" ]
375,010
375,011
u169696482
python
p02658
n = int(input()) res = 1 a = list(map(int, input().split())) for i in a: res *= i if (res > 1000000000000000000): res = -1 break if res == -1: for i in a: if a == 0: res = 0 break print(res)
n = int(input()) res = 1 a = list(map(int, input().split())) for i in a: res *= i if (res > 1000000000000000000): res = -1 break if res == -1: for i in a: if i == 0: res = 0 break print(res)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
375,016
375,017
u758815106
python
p02658
n = int(input()) res = 1 a = list(map(int, input().split())) for i in a: res *= i if (res > 1000000000000000000): res = -1 if res == -1: for i in a: if a == 0: res = 0 break print(res)
n = int(input()) res = 1 a = list(map(int, input().split())) for i in a: res *= i if (res > 1000000000000000000): res = -1 break if res == -1: for i in a: if i == 0: res = 0 break print(res)
[ "control_flow.break.add", "identifier.change", "control_flow.branch.if.condition.change" ]
375,018
375,017
u758815106
python
p02658
n = int(input()) a = map(int, input().split()) over = False mul = 1 if 0 in a: mul = 0 for a_ in a: mul *= a_ if mul > 10**18: mul = -1 break print(mul)
n = int(input()) a = list(map(int, input().split())) over = False mul = 1 if 0 in a: mul = 0 for a_ in a: mul *= a_ if mul > 10**18: mul = -1 break print(mul)
[ "call.add", "call.arguments.change" ]
375,019
375,020
u112318601
python
p02658
n = int(input()) a = [int(i) for i in input().split(' ')] if a[0] == 0: print(0) else: x = 1 for i in a: x = x * i if x > 10**18: print(-1) break else: print(x)
n = int(input()) a = [int(i) for i in input().split(' ')] a = sorted(a) if a[0] == 0: print(0) else: x = 1 for i in a: x = x * i if x > 10**18: print(-1) break else: print(x)
[ "assignment.add" ]
375,023
375,024
u199290844
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 zero = 0 for i in range(n): if a[i] == 0: zero += 1 if zero > 0: print(-1) exit(0) for i in range(n): ans *= a[i] if ans > 1e+18: print(-1) exit(0) print(ans)
n = int(input()) a = list(map(int, input().split())) ans = 1 zero = 0 for i in range(n): if a[i] == 0: zero += 1 if zero > 0: print(0) exit(0) for i in range(n): ans *= a[i] if ans > 1e+18: print(-1) exit(0) print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,025
375,026
u451748673
python
p02658
N = int(input()) a = [int(i) for i in input().split(" ")] res=1 xx=10**18 f=0 for i in a: res*=i if res>xx: f=1 print(-1) break if f==0: print(res)
N = int(input()) a = [int(i) for i in input().split(" ")] res=1 xx=10**18 f=0 a.sort() for i in a: res*=i if res>xx: f=1 print(-1) break if f==0: print(res)
[ "call.add" ]
375,034
375,035
u013061784
python
p02658
import sys n = int(input()) l = list(map(int,input().split())) ##print(n) ##print(l) x = l[0] if 0 in l: print(-1) sys.exit() for i in range(1,n): ##print(i) ##print(l[i]) x *= l[i] if x >+ 1000000000000000000: ##print(i) ##print(x) print(-1) sys.exit() print(x)
import sys n = int(input()) l = list(map(int,input().split())) ##print(n) ##print(l) x = l[0] if 0 in l: print(0) sys.exit() for i in range(1,n): ##print(i) ##print(l[i]) x *= l[i] if x >+ 1000000000000000000: ##print(i) ##print(x) print(-1) sys.exit() print(x)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,036
375,037
u876616721
python
p02658
n = int(input()) x = list(map(int, input().split())) a = 1 if 0 in x: print(0) else: for i in x: a *= i if a > pow(10,18): print(-1) else: print(a)
n = int(input()) x = list(map(int, input().split())) a = 1 if 0 in x: print(0) else: for i in x: a *= i if a > pow(10,18): print(-1) break else: print(a)
[ "control_flow.break.add" ]
375,042
375,043
u876238639
python
p02658
n = int(input()) MAX_NUM = 10 ** 18 nums = map(int, input().split()) for num in nums: if num == 0: print(0) exit() ans = 1 for num in nums: ans *= num if ans > MAX_NUM: print(-1) exit() print(int(ans))
n = int(input()) MAX_NUM = 10 ** 18 nums = list(map(int, input().split())) for num in nums: if num == 0: print(0) exit() ans = 1 for num in nums: ans *= num if ans > MAX_NUM: print(-1) exit() print(ans)
[ "call.add", "call.arguments.change", "call.remove" ]
375,046
375,047
u901466816
python
p02658
n = int(input()) MAX_NUM = 10 ** 18 nums = map(int, input().split()) for num in nums: if num == 0: print(0) exit() ans = 1 for num in nums: ans *= num if ans > MAX_NUM: print(-1) exit() print(ans)
n = int(input()) MAX_NUM = 10 ** 18 nums = list(map(int, input().split())) for num in nums: if num == 0: print(0) exit() ans = 1 for num in nums: ans *= num if ans > MAX_NUM: print(-1) exit() print(ans)
[ "call.add", "call.arguments.change" ]
375,048
375,047
u901466816
python
p02658
def main(n, a): for x in a: if(x == 0): print(0) return ans = a[0] for i in range(1, n): ans = ans * a[i] if(ans > 1000000000000000000): print(-1) return print(ans) if(__name__ == '__main__'): n = int(input()) a = map(int, input().split()) main(n, a)
def main(n, a): a = list(a) for x in a: if(x == 0): print(0) return ans = a[0] for i in range(1, n): ans = ans * a[i] if(ans > 1000000000000000000): print(-1) return print(ans) if(__name__ == '__main__'): n = int(input()) a = map(int, input().split()) main(n, a)
[ "assignment.add" ]
375,055
375,056
u812183922
python
p02658
N = int(input()) A = [int(x) for x in input().split()] reg = A[0] flg=True if 0 in A: print(0) flg=False reg=0 for i in range(1, N): reg *= a if reg>10**18: print(-1) flg=False break if flg: print(reg)
N = int(input()) A = [int(x) for x in input().split()] reg = A[0] flg=True if 0 in A: print(0) flg=False reg=0 for i in range(1, N): reg *= A[i] if reg>10**18: print(-1) flg=False break if flg: print(reg)
[]
375,062
375,061
u580774391
python
p02658
N = int(input()) A = list(map(int,input().split())) B = 1 # print(max(A)) if 0 in A: print(0) elif max(A) > 10**18: print(-1) else: for i in A: B *= i if B > 10 ** 18: print(-1) break print(B)
N = int(input()) A = list(map(int,input().split())) B = 1 # print(max(A)) if 0 in A: print(0) elif max(A) > 10**18: print(-1) else: for i in A: B *= i if B > 10 ** 18: B = -1 break print(B)
[ "call.arguments.change" ]
375,067
375,068
u221766194
python
p02658
N = int(input()) A = list(map(int,input().split())) B = 1 if 0 in A: print(0) elif max(A) >= 10**18: print(-1) else: for i in A: B *= i if B > 10 ** 18: print(-1) break print(B)
N = int(input()) A = list(map(int,input().split())) B = 1 # print(max(A)) if 0 in A: print(0) elif max(A) > 10**18: print(-1) else: for i in A: B *= i if B > 10 ** 18: B = -1 break print(B)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.arguments.change" ]
375,069
375,068
u221766194
python
p02658
n=int(input()) a=list(map(int,input().split())) answer=1 for i in range(n): answer*=a[i] if answer>10**18: answer=-1 break if a.cout(0)>0: answer=0 print(answer)
n=int(input()) a=list(map(int,input().split())) answer=1 for i in range(n): answer*=a[i] if answer>10**18: answer=-1 break if a.count(0)>0: answer=0 print(answer)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
375,071
375,072
u234582237
python
p02658
n=int(input()) a=list(map(int,input().split())) answer=1 for i in range(n): answer*=a[i] if answer>10**18: answer=-1 if a.count(0)>0: answer=0 print(answer)
n=int(input()) a=list(map(int,input().split())) answer=1 for i in range(n): answer*=a[i] if answer>10**18: answer=-1 break if a.count(0)>0: answer=0 print(answer)
[ "control_flow.break.add" ]
375,073
375,072
u234582237
python
p02658
n = int(input()) l = list(map(int, input().split())) cur = 1 if 0 in l: print(0) exit() for i in l: cur *= i if cur >= 1000000000000000000: print(-1) exit() print(cur)
n = int(input()) l = list(map(int, input().split())) cur = 1 if 0 in l: print(0) exit() for i in l: cur *= i if cur > 1000000000000000000: print(-1) exit() print(cur)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
375,077
375,078
u110336920
python
p02658
N = int(input()) A = [int(i) for i in input().split()] res=1 for x in A: res = res*x if res > 10 ** 18: res = -1 break print(res)
N = int(input()) A = sorted([int(i) for i in input().split()]) res=1 for x in A: res = res*x if res > 10 ** 18: res = -1 break print(res)
[ "call.add", "call.arguments.change" ]
375,079
375,080
u567664824
python
p02658
import sys n = int(input()) print(n) prod = 1 overflow = False a = list(map(int,input().split())) for aa in a: if prod * aa > 1000000 * 1000000 * 1000000: overflow = True else: prod = prod * aa for aa in a: if aa == 0: overflow = False if overflow: print(-1) else: print(prod)
import sys n = int(input()) #print(n) prod = 1 overflow = False a = list(map(int,input().split())) for aa in a: if prod * aa > 1000000 * 1000000 * 1000000: overflow = True else: prod = prod * aa for aa in a: if aa == 0: overflow = False if overflow: print(-1) else: print(prod)
[ "call.remove" ]
375,081
375,082
u909117696
python
p02658
def m(): N = int(input()) A = list(map(int, input().split())) times = 1 c = 0 for i in A: while times <= 10**18 and c < N: times *= i c += 1 if times > 10 ** 18: times = -1 if 0 in A: times = 0 print(times) m()
def m(): N = int(input()) A = list(map(int, input().split())) times = 1 c = 0 for i in A: if times <= 10**18 and c < N: times *= i c += 1 if times > 10 ** 18: times = -1 if 0 in A: times = 0 print(times) m()
[ "control_flow.branch.while.replace.add", "control_flow.loop.if.replace.remove" ]
375,095
375,096
u296984343
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 for i in A: ans *= i if ans > 10 ** 18: print('-1') exit() print(ans)
N = int(input()) A = list(map(int, input().split())) A = sorted(A) ans = 1 for i in A: ans *= i if ans > 10 ** 18: print('-1') exit() print(ans)
[ "assignment.add" ]
375,097
375,098
u101350975
python
p02658
from functools import reduce from operator import mul l = int(input()) x = list(map(int, input().split())) # print(x) # result = reduce(mul, x) result = 1 limit = 10 ** 18 for i in x: if result < limit and i != 0: result = result * i if limit < result: result = -1 print(result)
from functools import reduce from operator import mul l = int(input()) x = list(map(int, input().split())) # print(x) # result = reduce(mul, x) result = 1 limit = 10 ** 18 for i in x: if result < limit or i == 0: result = result * i if limit < result: result = -1 print(result)
[ "control_flow.branch.if.condition.change", "misc.opposites", "expression.operator.compare.change" ]
375,103
375,104
u217165632
python
p02658
n = int(input()) l = list(map(int, input().split())) sol = 1 nula = 0 over = 0 for i in l: if (i == 0): nula = 1 sol = sol * i if sol>1000000000000000000: over = 1 break if (nula == 1): print(0) elif (over == 1): print(-1) else: print(sol)
n = int(input()) l = list(map(int, input().split())) sol = 1 nula = 0 over = 0 for i in l: if (i == 0): nula = 1 sol = sol * i if sol>1000000000000000000: over = 1 sol = 0 if (nula == 1): print(0) elif (over == 1): print(-1) else: print(sol)
[ "assignment.variable.change" ]
375,105
375,106
u828669332
python
p02658
n = int(input()) nums = list(map(int,input().split())) limit = 10**18 res = 1 i = 0 if 0 in num: print(0) exit() while i<n: res *= nums[i] i += 1 if res > limit: res = -1 break print(res)
n = int(input()) nums = list(map(int,input().split())) limit = 10**18 res = 1 i = 0 if 0 in nums: print(0) exit() while i<n: res *= nums[i] i += 1 if res > limit: res = -1 break print(res)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
375,122
375,123
u740267532
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 if A in 0: print(0) exit() for i in range(N): ans *= A[i] if ans > 10**18: print(-1) exit() print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 if 0 in A: print(0) exit() for i in range(N): ans *= A[i] if ans > 10**18: print(-1) exit() print(ans)
[ "control_flow.branch.if.condition.change" ]
375,130
375,131
u200527996
python
p02658
n = int(input()) a = list(map(int, input().split())) q = 1000000000000000000 b = 1 cek = True zero = a.count(0) if zero > 0 : print("0") else : for i in range(n) : b = b*a[i] if b > q : break cek = False if cek : print(b) else : print("-1")
n = int(input()) a = list(map(int, input().split())) q = 1000000000000000000 b = 1 cek = True zero = a.count(0) if zero > 0 : print("0") else : for i in range(n) : b = b*a[i] if b > q : cek = False break if cek : print(b) else : print("-1")
[ "control_flow.break.remove", "control_flow.break.add" ]
375,134
375,135
u047485390
python
p02658
n=int(input()) a=list(map(int,input().split())) ans=1 if 0 in a: print(-1) exit() for i in a: ans*=i if ans>10**18: print(-1) exit() print(ans)
n=int(input()) a=list(map(int,input().split())) ans=1 if 0 in a: print(0) exit() for i in a: ans*=i if ans>10**18: print(-1) exit() print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,136
375,137
u449473917
python
p02658
n = int(input()) arr = list(map(int, input().split())) ans = 1 f = 0 arr.sort() for i in arr: ans *= i if ans > 1000000000000000000: f = 1 print(ans) break if f == 0: print(ans)
n = int(input()) arr = list(map(int, input().split())) ans = 1 f = 0 arr.sort() for i in arr: ans *= i if ans > 1e18: f = 1 print(-1) break if f == 0: print(ans)
[ "control_flow.branch.if.condition.change", "call.arguments.change", "io.output.change", "expression.operation.unary.add" ]
375,138
375,139
u410967766
python
p02658
N = int(input()) lis = list(map(int,input().split())) ans = 1 flag = True if 0 in lis: print(0) else: for i in range(N): ans = ans*lis[i] if ans > 1000000000000000000: print(-1) flag = False if flag == True: print(ans)
N = int(input()) lis = list(map(int,input().split())) ans = 1 flag = True if 0 in lis: print(0) else: for i in range(N): ans = ans*lis[i] if ans > 1000000000000000000: print(-1) flag = False break if flag == True: print(ans)
[ "control_flow.break.add" ]
375,142
375,143
u318740143
python
p02658
# -*- coding:utf-8 -*- import sys def main(): n = int(input().strip()) l = list(map(int, input().split())) sum = 1 if 0 in l : print (0) return for i in l: sum *= i if sum - 1000000000000000000 > 0: print (sum) print (-1) return print (sum) main()
# -*- coding:utf-8 -*- import sys def main(): n = int(input().strip()) l = list(map(int, input().split())) sum = 1 if 0 in l : print (0) return for i in l: sum *= i if sum - 1000000000000000000 > 0: print (-1) return print (sum) main()
[ "call.remove" ]
375,150
375,151
u846516787
python
p02658
N = int(input()); A = list(map(int, input().split())) ans = 1 for i in range(N): ans *= A[i] if ans > 10**18: print(-1) exit() print(ans)
N = int(input()); A = list(map(int, input().split())) A.sort() ans = 1 for i in range(N): ans *= A[i] if ans > 10**18: print(-1) exit() print(ans)
[ "call.add" ]
375,152
375,153
u812973725
python
p02658
n = int(input()) a = list(map(int,input().split())) ans = 1 if 0 in a: ans = 0 else: for i in a: ans *= i if ans > 1000000000000000000: ans = -1 print(ans)
n = int(input()) a = list(map(int,input().split())) ans = 1 if 0 in a: ans = 0 else: for i in a: ans *= i if ans > 1000000000000000000: ans = -1 break print(ans)
[ "control_flow.break.add" ]
375,154
375,155
u557953657
python
p02658
def readinput(): n=int(input()) a=list(map(int,input().split())) return n,a def main(n,a): if(a.count(0)!=0): return 0 res=a[0] for i in range(1,n): res*=a[i] if res>INFTY: return -1 return res if __name__=='__main__': n,a=readinput() an...
INFTY=10**18 def readinput(): n=int(input()) a=list(map(int,input().split())) return n,a def main(n,a): if(a.count(0)!=0): return 0 res=a[0] for i in range(1,n): res*=a[i] if res>INFTY: return -1 return res if __name__=='__main__': n,a=read...
[ "assignment.add" ]
375,158
375,159
u592547545
python
p02658
import sys n = int(input()) a = list(map(int,input().split())) f = False; for i in range(n): if a[i] == 0: f = True if f: print(n) sys.exit(0) ans = 1 for i in range(n): ans *= a[i] if ans > 1e18: print(-1) sys.exit(0) print(ans)
import sys n = int(input()) a = list(map(int,input().split())) f = False; for i in range(n): if a[i] == 0: f = True if f: print(0) sys.exit(0) ans = 1 for i in range(n): ans *= a[i] if ans > 1e18: print(-1) sys.exit(0) print(ans)
[ "identifier.replace.remove", "literal.replace.add", "call.arguments.change", "io.output.change" ]
375,160
375,161
u628047647
python
p02658
N = int(input()) A = list(map(int,input().split())) ans = 1 if 0 in A: ans = 0 if ans != 0: for num in A: if ans > 1e+18/num: ans = -1 break ans = ans * num print(ans)
N = int(input()) A = list(map(int,input().split())) ans = 1 if 0 in A: ans = 0 if ans != 0: for num in A: if ans * num > 1e+18: ans = -1 break ans = ans * num print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
375,166
375,167
u463260769
python
p02658
N = int(input()) A = map(int, input().split()) if 0 in A: print(0) exit() ans = 1 for a in A: ans *= a if ans > 10**18: print(-1) break else: print(ans)
N = int(input()) A = list(map(int, input().split())) if 0 in A: print(0) exit() ans = 1 for a in A: ans *= a if ans > 10**18: print(-1) break else: print(ans)
[ "call.add", "call.arguments.change" ]
375,172
375,173
u195177386
python
p02658
N=int(input()) As=list(map(int,input().split())) Ans=1 if As.count(0): print(0) exit() else: for A in range(N): if Ans>10**18: print(Ans) exit() else: NewAns=Ans*As[A] Ans=NewAns if Ans>10**18: Ans=-1 print(Ans)
N=int(input()) As=list(map(int,input().split())) Ans=1 if As.count(0): print(0) exit() else: for A in range(N): if Ans>10**18: Ans=-1 print(Ans) exit() else: NewAns=Ans*As[A] Ans=NewAns if Ans>10**18: Ans=-1 pr...
[ "assignment.add" ]
375,174
375,175
u674588203
python
p02658
n = int(input()) S = list(map(int,input().split())) ans = 1 for i in S: if ans >= 0: ans = ans * i if ans >= 10**18: ans = -1 if 0 in S: ans = 0 print(ans)
n = int(input()) S = list(map(int,input().split())) ans = 1 for i in S: if ans >= 0: ans = ans * i if ans > 10**18: ans = -1 if 0 in S: ans = 0 print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
375,176
375,177
u761638117
python
p02658
n = int(input()) k = list(map(int,input().split())) ans = 1 if 0 in k: ans = 0 for i in range(n): if ans == 0: break ans *= k[i] if ans > 10**18: ans = -1 break print(ans) print(k)
n = int(input()) k = list(map(int,input().split())) ans = 1 if 0 in k: ans = 0 for i in range(n): if ans == 0: break ans *= k[i] if ans > 10**18: ans = -1 break print(ans)
[ "call.remove" ]
375,184
375,185
u281796054
python
p02658
N= int(input()) A= list(map(int,input().split())) A = sorted(A) if A[0] == 0: print(0) else: S = 1 for n in range(N): S *= A[N-1-n] if S > 10**18: S = -1 print(S)
N= int(input()) A= list(map(int,input().split())) A = sorted(A) if A[0] == 0: print(0) else: S = 1 for n in range(N): S *= A[N-1-n] if S > 10**18: S = -1 break print(S)
[ "control_flow.break.add" ]
375,190
375,191
u647796955
python
p02658
n = input() a = input().split() a = [int(s) for s in a] a.sort(reverse=True) if a[-1] == 0: print(0) sum = 1 for i in a: sum *= i if sum > 10**18: sum = -1 break print(sum)
n = input() a = input().split() a = [int(s) for s in a] a.sort(reverse=True) if a[-1] == 0: print(0) else : sum = 1 for i in a: sum *= i if sum > 10**18: sum = -1 break print(sum)
[]
375,192
375,193
u921016616
python
p02658
import math n= int(input()) l = list(map(int,input().split())) l.sort(reverse = True) print(l) ans = 1 if 0 in l: print(0) else: for i in range(n): ans *= l[i] # print(ans) if ans > 10**18: break print(ans if ans <= 10**18 else -1)
import math n= int(input()) l = list(map(int,input().split())) l.sort(reverse = True) ans = 1 if 0 in l: print(0) else: for i in range(n): ans *= l[i] # print(ans) if ans > 10**18: break print(ans if ans <= 10**18 else -1)
[ "call.remove" ]
375,196
375,197
u427984570
python
p02658
n=int(input()) a=list(map(int, input().split())) ans=a[0] for i in a: if i==0: print(-1) exit() for i in a[1:]: ans*=i if ans>10**18: print(-1) exit() print(ans)
n=int(input()) a=list(map(int, input().split())) ans=a[0] for i in a: if i==0: print(0) exit() for i in a[1:]: ans*=i if ans>10**18: print(-1) exit() print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,198
375,199
u917444023
python
p02658
N = int(input()) List = list(map(int,input().split())) ans = 1 for item in List: ans *= item if ans > 10 **18: ans = -1 print(ans)
N = int(input()) List = list(map(int,input().split())) ans = 1 for item in List: ans *= item if ans > 10 **18 or ans <= -1: ans = -1 print(ans)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
375,203
375,204
u760794812
python
p02658
n = int(input()) l = list(map(int,input().split())) ans = l[0] minn = min(l) if (minn == 0): print(-1) else: for i in range(1,len(l)): ans = ans * l[i] if ans >= 1000000000000000001: break if ans >= 1000000000000000001: print(-1) else: print(ans) ...
n = int(input()) l = list(map(int,input().split())) ans = l[0] minn = min(l) if (minn == 0): print(0) else: for i in range(1,len(l)): ans = ans * l[i] if ans >= 1000000000000000001: break if ans >= 1000000000000000001: print(-1) else: print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,205
375,206
u335950809
python
p02658
n = int(input()) lista = list(map(int, input().split())) limitNumber = 10**18 ans = 1 if 0 in lista: ans = 0 else: lista.sort(reverse=True) print(lista) for i in range(n): ans *= lista[i] if(ans > limitNumber): ans = -1 break print(ans)
n = int(input()) lista = list(map(int, input().split())) limitNumber = 10**18 ans = 1 if 0 in lista: ans = 0 else: lista.sort(reverse=True) for i in range(n): ans *= lista[i] if(ans > limitNumber): ans = -1 break print(ans)
[ "call.remove" ]
375,209
375,210
u430483125
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 if 0 in a: print(-1) exit() for i in range(n): ans *= a[i] if ans > 1000000000000000000: print(-1) exit() print(ans)
n = int(input()) a = list(map(int, input().split())) ans = 1 if 0 in a: print(0) exit() for i in range(n): ans *= a[i] if ans > 1000000000000000000: print(-1) exit() print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
375,211
375,212
u066455063
python