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
#!/usr/bin/env python3 import sys def solve(N: int, A: "List[int]"): if 0 in A: print(0) prod = 1 for a in A: prod *= a if prod > int(1e18): print(-1) return print(prod) return # Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools ...
#!/usr/bin/env python3 import sys def solve(N: int, A: "List[int]"): if 0 in A: print(0) return prod = 1 for a in A: prod *= a if prod > int(1e18): print(-1) return print(prod) return # Generated by 1.1.7.1 https://github.com/kyuridenamida/...
[ "control_flow.return.add" ]
374,044
374,045
u329232967
python
p02658
n=int(input()) a=[int(x) for x in input().split()] if 0 in s: print(0) else: s=1 for c in range(n): s=s*a[c] if s>10**18: s=-1 break print(s)
n=int(input()) a=[int(x) for x in input().split()] if 0 in a: print(0) else: s=1 for c in range(n): s=s*a[c] if s>10**18: s=-1 break print(s)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
374,053
374,054
u631299617
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 for i in range(n): ans *= a[i] if ans > 1000000000000000000: print(-1) exit(0) print(ans)
n = int(input()) a = list(map(int, input().split())) a = sorted(a) ans = 1 for i in range(n): ans *= a[i] if ans > 1000000000000000000: print(-1) exit(0) print(ans)
[ "assignment.add" ]
374,076
374,077
u205473154
python
p02658
n = int(input()) a = list(map(int,input().split())) a.sort(reverse=True) if 0 in a : ans = 0 print(ans) else : ans = 1 for i in range(n): ans *= a[i] if ans > 10**18 : print(-1) break if ans <= 10**18 : print(ans)
n = int(input()) a = list(map(int,input().split())) a.sort(reverse=True) if 0 in a : ans = 0 print(ans) else : ans = 1 for i in range(n): ans *= a[i] if ans > 10**18 : print(-1) break if ans <= 10**18 and ans != 0 : print(ans)
[ "control_flow.branch.if.condition.change" ]
374,083
374,084
u453623947
python
p02658
num = int(input()) nums = list(map(int,input().split())) ans = 1 for i in nums: if i == 0: ans = 0 break ans *= i if ans > 10 **18: ans = -1 break print(ans)
num = int(input()) nums = list(map(int,input().split())) nums.sort() ans = 1 for i in nums: if i == 0: ans = 0 break ans *= i if ans > 10 **18: ans = -1 break print(ans)
[ "call.add" ]
374,085
374,086
u167874423
python
p02658
N = int(input()) A = list(map(int,input().split())) t = 1 ans = 1 count = 0 if 0 in A: ans = 0 for a in A: ans *= a t *= a while t >= 10: t /= 10 count += 1 if count >= 19: ans = -1 break if ans > 10**18: print(-1) else: print(ans)
N = int(input()) A = list(map(int,input().split())) t = 1 ans = 1 count = 0 if 0 in A: ans = 0 else: for a in A: ans *= a t *= a while t >= 10: t /= 10 count += 1 if count >= 19: ans = -1 break if ans > 10**18: ...
[]
374,087
374,088
u628285938
python
p02658
n = int(input()) a = list(map(int, input().split())) import math ans = 1 flag = 0 for i in range(n): ans = ans * a[i] // 1 if ans > 10**18: flag = 1 break if flag == 1: print(-1) else: print(ans)
n = int(input()) a = list(map(int, input().split())) import math ans = 1 flag = 0 a.sort() for i in range(n): ans = ans * a[i] // 1 if ans > 10**18: flag = 1 break if flag == 1: print(-1) else: print(ans)
[ "call.add" ]
374,100
374,101
u204208382
python
p02658
n = input() a = list(map(int, input().split())) if 0 in a: print(0) exit() ans = 1 for i in a: ans *= i if len(str(ans)) >= 18 and ans != 10**18: print(-1) exit() print(ans)
n = input() a = list(map(int, input().split())) if 0 in a: print(0) exit() ans = 1 for i in a: ans *= i if len(str(ans)) >= 19 and ans != 10**18: print(-1) exit() print(ans)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
374,114
374,115
u535010493
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 for x in a: ans *= x if ans > (10 ** 18): ans = -1 break print(ans)
n = int(input()) a = list(map(int, input().split())) a.sort() ans = 1 for x in a: ans *= x if ans > (10 ** 18): ans = -1 break print(ans)
[ "call.add" ]
374,120
374,121
u553623615
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 for x in a: ans *= x if ans >= (10 ** 18): ans = -1 break print(ans)
n = int(input()) a = list(map(int, input().split())) a.sort() ans = 1 for x in a: ans *= x if ans > (10 ** 18): ans = -1 break print(ans)
[ "call.add", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,122
374,121
u553623615
python
p02658
n=input() A=list(map(int,input().split())) ans=1 if A.count(0)==0: for i in A: ans*=i if ans>10**18: ans=-1 break print(ans)
n=input() A=list(map(int,input().split())) ans=1 if A.count(0)==0: for i in A: ans*=i if ans>10**18: ans=-1 break else: ans=0 print(ans)
[ "assignment.add" ]
374,125
374,126
u821775079
python
p02658
n=int(input()) lis=list(map(int,input().split())) ans=1 for i in lis: ans*=i if ans>1000000000000000000: ans=-1 break if 0 in lis: ans=0 else: print(ans)
n=int(input()) lis=list(map(int,input().split())) ans=1 for i in lis: ans*=i if ans>1000000000000000000: ans=-1 break if 0 in lis: ans=0 print(ans)
[]
374,130
374,131
u901598613
python
p02658
n = int(input()) a = [int(_) for _ in input().split()] ans = 1 for i in a: if i == 0: ans = 0 break ans *= i if ans > 10**18: ans = -1 break print(ans)
n = int(input()) a = [int(_) for _ in input().split()] a.sort() ans = 1 for i in a: if i == 0: ans = 0 break ans *= i if ans > 10**18: ans = -1 break print(ans)
[ "call.add" ]
374,137
374,138
u661439250
python
p02658
listed = input().split() mul = 1 for num in listed: num = int(num) if num == 0: mul = 0 break if mul != -1: mul *= num if mul > 10**18: mul = -1 print(mul)
N = input() listed = input().split() mul = 1 for num in listed: num = int(num) if num == 0: mul = 0 break if mul != -1: mul *= num if mul > 10**18: mul = -1 print(mul)
[ "assignment.add" ]
374,150
374,151
u064122548
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", "assignment.value.change" ]
374,157
374,155
u622847899
python
p02658
n = int(input()) An = [int(x) for x in input().split()] An.sort(reverse=True) if 0 in An: print(0) exit() j = 10 ** 18 ans = 1 for i in range(n): if ans > j: print(j) quit() ans *= An[i] if ans > j : print(-1) else : print(ans)
n = int(input()) An = [int(x) for x in input().split()] An.sort(reverse=True) if 0 in An: print(0) exit() j = 10 ** 18 ans = 1 for i in range(n): if ans > j: print(-1) quit() ans *= An[i] if ans > j : print(-1) else : print(ans)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.add" ]
374,158
374,159
u169200126
python
p02658
n=int(input()) a=list(input().split()) ans=1 f=0 i=0 while(i<n): if f==0: ans=ans*int(a[i]) if f==0 and ans>1000000000000000000: f=1 if int(a[i])==0: print(0) exit() i+=2 if f==1: print(-1) exit() print(ans)
n=int(input()) a=list(input().split()) ans=1 f=0 i=0 while(i<n): if f==0: ans=ans*int(a[i]) if f==0 and ans>1000000000000000000: f=1 if int(a[i])==0: print(0) exit() i+=1 if f==1: print(-1) exit() print(ans)
[ "literal.number.integer.change" ]
374,160
374,161
u048915776
python
p02658
n=int(input()) l=list(map(int, input().split())) m=1 for i in range(n): m*=l[i] print(m,i) if m>10**18: if 0 in l: print(0) exit() print(-1) exit() print(m)
n=int(input()) l=list(map(int, input().split())) m=1 for i in range(n): m*=l[i] if m>10**18: if 0 in l: print(0) exit() print(-1) exit() print(m)
[ "call.remove" ]
374,166
374,167
u748311048
python
p02658
N = int(input()) a = list(map(int, input().split())) b = 1 if 0 in a: b = 0 else: for i in range(N): b = b * a[i] if b > 10 ** 18: b = 'out' if b == 'out': print(-1) else: print(b)
N = int(input()) a = list(map(int, input().split())) b = 1 if 0 in a: b = 0 else: for i in range(N): b = b * a[i] if b > 10 ** 18: b = 'out' break if b == 'out': print(-1) else: print(b)
[ "control_flow.break.add" ]
374,180
374,181
u925593325
python
p02658
N = int(input()) a = list(map(int, input().split())) b = 1 if 0 in a: b = 0 else: for i in range(N): b *= a[i] if b > 10 ** 18: b = 'out' if b == 'out': print(-1) else: print(b)
N = int(input()) a = list(map(int, input().split())) b = 1 if 0 in a: b = 0 else: for i in range(N): b = b * a[i] if b > 10 ** 18: b = 'out' break if b == 'out': print(-1) else: print(b)
[ "assignment.value.change", "control_flow.break.add" ]
374,182
374,181
u925593325
python
p02658
n=int(input()) x=list(map(int, input().split())) ans=1 if 0 in x: ans=0 else: for i in x: ans*=i if ans>=10**18: ans=-1 break print(ans)
n=int(input()) x=list(map(int, input().split())) ans=1 if 0 in x: ans=0 else: for i in x: ans=ans*i if ans>10**18: ans=-1 break print(ans)
[ "assignment.value.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,183
374,184
u999503965
python
p02658
import copy def main(): n = int(input()) a = list( map( int, input().split())) sum = 1 if 0 in a: print(0) else: for i in a: sum = sum * i if sum > 1000000000000000000: print(-1) break print(sum) if __name__ == '__...
import copy def main(): n = int(input()) a = list( map( int, input().split())) sum = 1 if 0 in a: print(0) else: for i in a: sum = sum * i if sum > 1000000000000000000: print(-1) exit() print(sum) if __name__ == '_...
[ "control_flow.break.remove", "control_flow.exit.add", "call.add" ]
374,185
374,186
u798543098
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 if 0 in a: ans = 0 else: for i in range(n): ans *= a[i] if ans >= 10**18: 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 range(n): ans *= a[i] if ans > 10**18: ans = -1 break print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
374,200
374,199
u035445296
python
p02658
n = int(input()) a = list(map(input().split())) ans = 1 if 0 in a: ans = 0 else: for i in range(n): ans *= a[i] if ans >= 10**18: 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 range(n): ans *= a[i] if ans > 10**18: ans = -1 break print(ans)
[ "call.arguments.add", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
374,201
374,199
u035445296
python
p02658
N = int(input()) a = 1 L = list(map(int, input().split())) for i in L: a *= i if (a > 1e18): break print(-1 if a > 1e18 else a)
N = int(input()) a = 1 L = list(map(int, input().split())) L.sort() for i in L: a *= i if (a > 1e18): break print(-1 if a > 1e18 else a)
[ "call.add" ]
374,204
374,205
u722535636
python
p02658
import numpy as np N = int(input()) a = list(map(int, input().split())) sum = a[0] if 0 in a: print('0') for i in range(1, N): sum = sum * a[i] if sum > 10**18: print('-1') exit() print(sum)
import numpy as np N = int(input()) a = list(map(int, input().split())) sum = a[0] if 0 in a: print('0') exit() for i in range(1, N): sum = sum * a[i] if sum > 10**18: print('-1') exit() print(sum)
[ "call.add" ]
374,209
374,210
u540746268
python
p02658
import numpy as np N = int(input()) a = list(map(int, input().split())) sum = a[0] if 0 in a: print(0) for i in range(1, N): sum = sum * a[i] if sum > 10**18: print('-1') exit() print(sum)
import numpy as np N = int(input()) a = list(map(int, input().split())) sum = a[0] if 0 in a: print('0') exit() for i in range(1, N): sum = sum * a[i] if sum > 10**18: print('-1') exit() print(sum)
[ "call.arguments.change", "call.add" ]
374,211
374,210
u540746268
python
p02658
n = int(input()) a = list(map(int,input().split())) b =1 if 0 in a: print(0) for i in range(n): b *= a[i] if b>10**18: b=-1 break else: continue print(b)
n = int(input()) a = list(map(int,input().split())) b =1 if 0 in a: b=0 for i in range(n): b *= a[i] if b>10**18: b=-1 break else: continue print(b)
[ "call.arguments.change" ]
374,214
374,215
u008323723
python
p02658
a=int(input()) b=list(map(int,input().split())) ans=1 for i in range(a): ans=ans*b[i] if ans>10**18: ans=-1 break print(ans)
a=int(input()) b=list(map(int,input().split())) b.sort() ans=1 for i in range(a): ans=ans*b[i] if ans>10**18: ans=-1 break print(ans)
[ "call.add" ]
374,218
374,219
u233588813
python
p02658
n = int(input()) l = list(map(int, input().split())).sort() if l[0] == 0: print(0) exit() res = 1 for i in l: res *= i if res > 10 **18: print(res) exit() print(res)
n = int(input()) l = list(map(int, input().split())) l.sort() if l[0] == 0: print(0) exit() res = 1 for i in l: res *= i if res > 10 **18: print(-1) exit() print(res)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.add" ]
374,222
374,223
u743354620
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 t = 1e18 if 0 in a: print(0) exit(0) for i in range(n): ans *= a[i] if ans > t: print(-1) exit(0) prin(ans)
n = int(input()) a = list(map(int, input().split())) ans = 1 t = 1e18 if 0 in a: print(0) exit(0) for i in range(n): ans *= a[i] if ans > t: print(-1) exit(0) print(ans)
[ "identifier.change", "call.function.change" ]
374,226
374,227
u256027816
python
p02658
import sys N=int(input()) A=[int(i) for i in input().split()] p=1 for i in A: if i==0: print(-1) sys.exit() for i in A: p=p*i if p>1000000000000000000: print(-1) sys.exit() print(p)
import sys N=int(input()) A=[int(i) for i in input().split()] p=1 for i in A: if i==0: print(0) sys.exit() for i in A: p=p*i if p>1000000000000000000: print(-1) sys.exit() print(p)
[ "call.arguments.change", "io.output.change", "expression.operation.unary.remove" ]
374,234
374,235
u915622184
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) else: print(ans)
N = int(input()) A = list(map(int, input().split())) ans = 1 if 0 in A: print(0) else: for i in range(N): ans *= A[i] if ans > 10**18: print(-1) exit() print(ans)
[ "call.arguments.change" ]
374,236
374,237
u957198490
python
p02658
n=int(input()) a=list(map(int,input().split())) result=1 for i in a: result*=i if 10**18<result: result=-1 break print(result)
n=int(input()) a=list(map(int,input().split())) a.sort() result=1 for i in a: result*=i if 10**18<result: result=-1 break print(result)
[ "call.add" ]
374,238
374,239
u956547804
python
p02658
N = int(input()) A = list(map(int,input().split())) over_value = 10 ** 18 + 1 total = 1 cnt = 0 while cnt < N: total *= A[cnt] if total >= over_value: total = -1 cnt += 1 for i in range(N): if A[i] == 0: total = 0 print(total)
N = int(input()) A = list(map(int,input().split())) over_value = 10 ** 18 total = 1 cnt = 0 while cnt < N: total *= A[cnt] if total > over_value: total = -1 break cnt += 1 for i in range(N): if A[i] == 0: total = 0 print(total)
[ "expression.operation.binary.remove", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
374,245
374,246
u883866798
python
p02658
N = int(input()) A = list(map(int, input().split())) S = set(A) if 0 in S: print(0) exit() upp = 10**18 flag = 1 ans = 1 print(A) for a in A: ans *= a if ans > upp: ans = -1 break print(ans)
N = int(input()) A = list(map(int, input().split())) S = set(A) if 0 in S: print(0) exit() upp = 10**18 flag = 1 ans = 1 #print(A) for a in A: ans *= a if ans > upp: ans = -1 break print(ans)
[ "call.remove" ]
374,252
374,253
u941644149
python
p02658
N = int(input()) A = list(map(int, input().split())) A.sort(reverse=True) a = 1 if 0 in A: print(0) exit() for i in A: a *= i if a >= 10**18: print('-1') exit() print(a)
N = int(input()) A = list(map(int, input().split())) A.sort(reverse=True) a = 1 if 0 in A: print(0) exit() for i in A: a *= i if a > 10**18: print('-1') exit() print(a)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,256
374,257
u232697111
python
p02658
N = int(input()) A = list(map(int, input().split())) result = 1 flag = 0 for a in A: if a == 0: zero_flag = 1 result = 0 break else: result = result * a if result > pow(10, 18): flag = 1 result = 0 if flag == 1 and zero_flag != 1: print(-1) els...
N = int(input()) A = list(map(int, input().split())) result = 1 flag = 0 zero_flag = 0 for a in A: if a == 0: zero_flag = 1 result = 0 break else: result = result * a if result > pow(10, 18): flag = 1 result = 0 if flag == 1 and zero_flag != 1: ...
[ "assignment.add" ]
374,261
374,262
u470439462
python
p02658
n = int(input()) s = sorted(map,int,input().split()) M = 10 ** 18 ans = 1 for ss in s: ans *= ss if ans > M: ans = -1 break elif ans == 0: break print(ans)
n = int(input()) s = sorted(map(int,input().split())) M = 10 ** 18 ans = 1 for ss in s: ans *= ss if ans > M: ans = -1 break elif ans == 0: break print(ans)
[ "assignment.value.change", "call.arguments.change" ]
374,269
374,270
u198930868
python
p02658
n = int(input()) s = sorted(map,int,input().split()) M = 10 ** 18 ans = 1 for ss in s: ans *= ss if ans > M: ans = -1 break elif ans == 0: break
n = int(input()) s = sorted(map(int,input().split())) M = 10 ** 18 ans = 1 for ss in s: ans *= ss if ans > M: ans = -1 break elif ans == 0: break print(ans)
[ "assignment.value.change", "call.arguments.change", "call.add" ]
374,271
374,270
u198930868
python
p02658
# coding: utf-8 # Your code here! N = int(input()) L = list(map(int, input().split())) ans = 1 for n in range(N): ans = L[n]*ans if ans >= 1000000000000000001: ans = -1 if ans == -1: break for n in range(N): if L[n] == 0: ans = -1 print(ans)
# coding: utf-8 # Your code here! N = int(input()) L = list(map(int, input().split())) ans = 1 for n in range(N): ans = L[n]*ans if ans >= 1000000000000000001: ans = -1 if ans == -1: break for n in range(N): if L[n] == 0: ans = 0 print(ans)
[ "assignment.value.change", "expression.operation.unary.remove" ]
374,273
374,274
u795009336
python
p02658
n=int(input()) x=list(map(int,input().split())) ans=1 if 0 in x: print(0) else: for i in x: ans*=i if ans>10**18: ans=-1 break print(ans,i) if ans==-1: print("-1") else: print(ans)
n=int(input()) x=list(map(int,input().split())) ans=1 if 0 in x: print(0) else: for i in x: ans*=i if ans>10**18: ans=-1 break if ans==-1: print("-1") else: print(ans)
[ "call.remove" ]
374,286
374,287
u746206084
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 if 0 in a: print(-1) else: 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) else: 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" ]
374,292
374,293
u851319680
python
p02658
n = int(input()) a = list(map(int, input().split())) ans = 1 if 0 in a: print(-1) else: 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) else: 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" ]
374,294
374,293
u851319680
python
p02658
n = int(input()) a = list(map(int, input().split())) r = a[0] for i in a[1:]: r *= i if r > 10**8: r = -1 break if 0 in a: r = 0 print(r)
n = int(input()) a = list(map(int, input().split())) r = a[0] for i in a[1:]: r *= i if r > 10**18: r = -1 break if 0 in a: r = 0 print(r)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
374,302
374,303
u465246274
python
p02658
a = int(input()) b = input().split() c = 1 for i in range(a): if b[i] == 0: c = 0 if c == 1: for i in range(a): c = c*int(b[i]) if c > 1000000000000000000: break if c > 1000000000000000000: print(-1) else: print(c)
a = int(input()) b = input().split() c = 1 for i in range(a): if int(b[i]) == 0: c = 0 if c == 1: for i in range(a): c = c*int(b[i]) if c > 1000000000000000000: break if c > 1000000000000000000: print(-1) else: print(c)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "call.add" ]
374,306
374,307
u068862829
python
p02658
import sys N = int(input()) An = [] mul = 1 An = list(map(int,input().split())) if An.count(0) > 0: print(-1) sys.exit() for i in An: mul *= i if mul > 10**18: print("-1") sys.exit() if mul <= 10**18: print(mul)
import sys N = int(input()) An = [] mul = 1 An = list(map(int,input().split())) if An.count(0) > 0: print("0") sys.exit() for i in An: mul *= i if mul > 10**18: print("-1") sys.exit() if mul <= 10**18: print(mul)
[ "call.arguments.change" ]
374,317
374,318
u679089074
python
p02658
n=input() x=[int(i) for i in input().split()] prod=1 for i in x: prod=prod*i if prod>1000000000000000000: break if prod>1000000000000000000: print(-1) else: print(prod)
n=input() x=[int(i) for i in input().split()] x.sort() prod=1 for i in x: prod=prod*i if prod>1000000000000000000: break if prod>1000000000000000000: print(-1) else: print(prod)
[ "call.add" ]
374,323
374,324
u275885859
python
p02658
p=int(input()) k=list(map(int,input().split())) if 0 in k: print(0) else: t=k[0] for e in range(1,len(k)): t = t * k[e] if t > 10**18: break if t > 10**8: print(-1) else: print(t)
p=int(input()) k=list(map(int,input().split())) if 0 in k: print(0) else: t=k[0] for e in range(1,len(k)): t = t * k[e] if t > 10**18: break if t > 10**18: print(-1) else: print(t)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
374,340
374,341
u942356554
python
p02658
p=int(input()) k=list(map(int,input().split())) if 0 in k: print(0) else: t=k[0] for e in range(1,len(k)): t = t * k[e] if t > 10**8: break if t > 10**8: print(-1) else: print(t)
p=int(input()) k=list(map(int,input().split())) if 0 in k: print(0) else: t=k[0] for e in range(1,len(k)): t = t * k[e] if t > 10**18: break if t > 10**18: print(-1) else: print(t)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change" ]
374,342
374,341
u942356554
python
p02658
n = int(input()) a = list(map(int,input().split())) result = 1 target = 10**18 if a.count(0) >= 1: result = 0 else: for an in a: result = an*result print(result) if result > target: result = -1 break print(result)
n = int(input()) a = list(map(int,input().split())) result = 1 target = 10**18 if a.count(0) >= 1: result = 0 else: for an in a: result = an*result if result > target: result = -1 break print(result)
[ "call.remove" ]
374,343
374,344
u543690404
python
p02658
n = int(input()) a = list(map(int, input().split())) i = 0 x = 1 while i < n: x = x * a[i] i += 1 if x > 1000000000000000000: print(-1) exit() print(x)
n = int(input()) a = list(map(int, input().split())) a.sort() i = 0 x = 1 while i < n: x = x * a[i] i += 1 if x > 1000000000000000000: print(-1) exit() print(x)
[ "call.add" ]
374,346
374,347
u202385788
python
p02658
n = int(input()) a = list(map(int,input.split())) a = sorted(a) prod = 1 for x in a: prod *= x if prod > 10**18: prod = -1 break print(prod)
n = int(input()) a = list(map(int,input().split())) a = sorted(a) prod = 1 for x in a: prod *= x if prod > 10**18: prod = -1 break print(prod)
[ "call.add" ]
374,348
374,349
u857605629
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 flag=False for a in A: ans *= a if ans > 1e18: flag=True break if flag: print(-1) else: print(ans)
N = int(input()) A = list(map(int, input().split())) A.sort() ans = 1 flag=False for a in A: ans *= a if ans > 1e18: flag=True break if flag: print(-1) else: print(ans)
[ "call.add" ]
374,350
374,351
u845573105
python
p02658
N = int(input()) A = list(map(int, input().split())) ans = 1 flag=False for a in A: ans *= a if ans > 1e18: flag=True break if flag: print(-1) else: print(ans)
N = int(input()) A = list(map(int, input().split())) A.sort() ans = 1 flag=False for a in A: ans *= a if ans > 1e18: flag=True break if flag: print(-1) else: print(ans)
[ "call.add" ]
374,352
374,351
u845573105
python
p02658
n=int(input()) list=[int(i) for i in input().split()] k=1 list.sort() x=list[0] while k<n: y=x*list[k] x=y if y<1000000000000000000: k=k+1 else: k=n+1 y=-1 print(y)
n=int(input()) list=[int(i) for i in input().split()] k=1 list.sort() x=list[0] while k<n: y=x*list[k] x=y if y<=1000000000000000000: k=k+1 else: k=n+1 y=-1 print(y)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,363
374,364
u071916806
python
p02658
n = input() a = input() a = a.split() x = 0; mul = 1; for num in a: if(int(num) == 0): mul = 0; break; else: mul *= int(num) if(mul > 1000000000000000000): mul = -1; break; print(mul);
n = input() a = input() a = a.split() x = 0; mul = 1; for num in a: if(int(num) == 0): mul = 0; break; for num in a: mul *= int(num) if(mul > 1000000000000000000): mul = -1; break; print(mul);
[]
374,369
374,370
u779386690
python
p02658
n = int(input()) arr = [] p = 1 c = 0 l = 0 a = list(map(int,input().strip().split()))[:n] for i in range(n): if a[i]==0: c = 1 if p > 1000000000000000000: l = 1 else: p *= a[i] if c == 1: print(0) elif l == 1: print(-1) else: print(p)
n = int(input()) arr = [] p = 1 c = 0 l = 0 a = list(map(int,input().strip().split()))[:n] for i in range(n): if a[i]==0: c = 1 if p > 1000000000000000000: l = 1 else: p *= a[i] if c == 1: print(0) elif l == 1 or p > 1000000000000000000 : print(-1) else: print(p)
[ "control_flow.branch.if.condition.change" ]
374,371
374,372
u529769303
python
p02658
n=int(input()) alist=list(map(int,input().split())) a=1 if 0 in alist: print("0") else: for i in alist: if a<=10**18: a=a*i else: break if a>=10**18: print('-1') else: print(a)
n=int(input()) alist=list(map(int,input().split())) a=1 if 0 in alist: print("0") else: for i in alist: if a<=10**18: a=a*i else: break if a>10**18: print('-1') else: print(a)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,377
374,378
u565433835
python
p02658
import sys n = int(input()) aa = input() a = aa.split() for i in range(n): if(a[i] == 0): print(0) sys.exit() result = 1 for i in range(n): result *= int(a[i]) if(result > 1000000000000000000): print(-1) sys.exit() print(result)
import sys n = int(input()) aa = input() a = aa.split() for i in range(n): if(int(a[i]) == 0): print(0) sys.exit() result = 1 for i in range(n): result *= int(a[i]) if(result > 1000000000000000000): print(-1) sys.exit() print(result)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
374,381
374,382
u050445028
python
p02658
n = int(input()) n_list = list(map(int, input().split())) multi = 1 a = 1 for i in range(n): if n_list[i]==0: a = 0 break for i in range(n): if a == 0: multi = 0 break multi *= n_list[i] if multi>1e18: break print(multi) if multi<=1e18: print(multi) else...
n = int(input()) n_list = list(map(int, input().split())) multi = 1 a = 1 for i in range(n): if n_list[i]==0: a = 0 break for i in range(n): if a == 0: multi = 0 break multi *= n_list[i] if multi>1e18: break if multi<=1e18: print(multi) else: print(-...
[ "call.remove" ]
374,407
374,408
u810787773
python
p02658
a = int(input()) b = input().split() for i in range(0,len(b)): b[i]=int(b[i]) state=1 for x in b: if x==0: state=0 print("0") break res=1 if state==1: for x in b: res*=x if res>1000000000000000000: print("-1") state=0 if state==1: pri...
a = int(input()) b = input().split() for i in range(0,len(b)): b[i]=int(b[i]) state=1 for x in b: if x==0: state=0 print("0") break res=1 if state==1: for x in b: res*=x if res>1000000000000000000: print("-1") state=0 break if...
[ "control_flow.break.add" ]
374,409
374,410
u939901541
python
p02658
n = int(input()) nums = list(map(int, input().split())) ans = 1 if nums.count(0) > 0: ans = 0 else: for i in range(n): ans *= nums[i] if ans >= 10**18: ans = -1 break else: break print(ans)
n = int(input()) nums = list(map(int, input().split())) ans = 1 if nums.count(0) > 0: ans = 0 else: for i in range(n): ans *= nums[i] if ans > 10**18: ans = -1 break print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.remove" ]
374,417
374,418
u457437854
python
p02658
n = int(input()) nums = list(map(int, input().split())) ans = 1 if nums.count(0) > 0: ans = 0 else: for i in range(n): ans *= nums[i] if ans >= 10**18: ans = -1 break print(ans)
n = int(input()) nums = list(map(int, input().split())) ans = 1 if nums.count(0) > 0: ans = 0 else: for i in range(n): ans *= nums[i] if ans > 10**18: ans = -1 break print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,419
374,418
u457437854
python
p02658
def main(): N = int(input()) A = list(map(int, input().split())) if 0 in A: print(0) return ans = 1 for a in A: ans *= a if ans >= pow(10, 10, 18): print(-1) return print(ans) if __name__ == "__main__": main()
def main(): N = int(input()) A = list(map(int, input().split())) if 0 in A: print(0) return ans = 1 for a in A: ans *= a if ans > pow(10, 18): print(-1) return print(ans) if __name__ == "__main__": main()
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "call.arguments.change" ]
374,420
374,421
u891692185
python
p02658
n = int(input()) a = [int(i) for i in input().split()] x = 1 f = 0 for i in range(n): #print(a[i]) x = x*a[i] if x == 0: print(0) f = 1 break elif x > 1000000000000000000: print(-1) f = 1 break if f == 0: print(x)
n = int(input()) a = [int(i) for i in input().split()] x = 1 f = 0 a.sort() for i in range(n): #print(a[i]) x = x*a[i] if x == 0: print(0) f = 1 break elif x > 1000000000000000000: print(-1) f = 1 break if f == 0: print(x)
[ "call.add" ]
374,424
374,425
u526278960
python
p02658
n = int(input()) a = [int(i) for i in input().split()] ans = 1 if 0 in a: print(0) else: for i in a: ans = ans * i if ans >= 1000000000000000000: break if ans >= 1000000000000000000: print('-1') else: print(ans)
n = int(input()) a = [int(i) for i in input().split()] ans = 1 if 0 in a: print(0) else: for i in a: ans = ans * i if ans > 1000000000000000000: break if ans > 1000000000000000000: print('-1') else: print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,426
374,427
u696469748
python
p02658
i = 0 ans = 1 n = int(input()) a = list(map(int, input().split())) if 0 in a: print(0) else: while ans<10**10 and i<len(a): ans*=a[i] i+=1 if (ans<=10**18): print(ans) else: print(-1)
i = 0 ans = 1 n = int(input()) a = list(map(int, input().split())) if 0 in a: print(0) else: while ans<10**18 and i<len(a): ans*=a[i] i+=1 if (ans<=10**18): print(ans) else: print(-1)
[ "literal.number.integer.change", "control_flow.loop.condition.change" ]
374,443
374,444
u517674755
python
p02658
n = int(input()) A = sorted(map(int,input().split())) ans = 1 if A[0] == 0: print(0) exit() for i in range(1,n+1): ans *= A[-i] if ans >= 10**18: print(-1) exit() print(ans)
n = int(input()) A = sorted(map(int,input().split())) ans = 1 if A[0] == 0: print(0) exit() for i in range(1,n+1): ans *= A[-i] if ans > 10**18: print(-1) exit() print(ans)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,445
374,446
u652656291
python
p02658
n = int(input()) A = list(map(int,input().split())) ans = 1 if A[0] == 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 = sorted(map(int,input().split())) ans = 1 if A[0] == 0: print(0) exit() for i in range(1,n+1): ans *= A[-i] if ans > 10**18: print(-1) exit() print(ans)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.add", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,448
374,446
u652656291
python
p02658
N = int(input()) A = list(map(float,input().split( ))) ans = 1 for a in A: ans *= a if ans > 1e18: ans = '-1' break for a in A: if a == 0: ans = 0 print(ans)
N = int(input()) A= list(map(int,input().split( ))) ans = 1 for a in A: ans *= a if ans > 1e18: ans = '-1' break for a in A: if a == 0: ans = 0 break print(ans)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "control_flow.break.add" ]
374,453
374,454
u618696829
python
p02658
N = int(input()) A = list(map(float,input().split( ))) ans = 1 for a in A: ans *= a if ans >= 1e18: ans = '-1' break for a in A: if a == 0: ans = 0 print(ans)
N = int(input()) A= list(map(int,input().split( ))) ans = 1 for a in A: ans *= a if ans > 1e18: ans = '-1' break for a in A: if a == 0: ans = 0 break print(ans)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "control_flow.break.add" ]
374,455
374,454
u618696829
python
p02658
n = int(input()) A = [int(i) for i in input().split()] check = [i for i in A if i == 0] if 0 in check: print(0) else: A.sort(reverse=True) work = 1 for a in A: work *= a if work > 10**18: print(work) print('-1') break else: print(work)
n = int(input()) A = [int(i) for i in input().split()] check = [i for i in A if i == 0] if 0 in check: print(0) else: A.sort(reverse=True) work = 1 for a in A: work *= a if work > 10**18: print('-1') break else: print(work)
[ "call.remove" ]
374,463
374,464
u108072608
python
p02658
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it. ''' n = int(input()) a = list(map(int,input().strip().split()))[:n] x=1 flag=0 flag1=0 for i in range(n): if a[i]==...
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it. ''' n = int(input()) a = list(map(int,input().strip().split()))[:n] x=1 flag=0 flag1=0 for i in range(n): if a[i]==...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "control_flow.break.add" ]
374,470
374,471
u277060039
python
p02658
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it. ''' n = int(input()) a = list(map(int,input().strip().split()))[:n] x=1 flag=0 flag1=0 for i in range(n): if a[i]==...
''' Online Python Compiler. Code, Compile, Run and Debug python program online. Write your code in this editor and press "Run" button to execute it. ''' n = int(input()) a = list(map(int,input().strip().split()))[:n] x=1 flag=0 flag1=0 for i in range(n): if a[i]==...
[ "assignment.compound.arithmetic.replace.remove", "expression.operator.arithmetic.replace.add", "control_flow.break.add" ]
374,472
374,471
u277060039
python
p02658
N = int(input()) mlist = list(map(int,input().split())) s = 1 for i in range(N): if mlist[i] == 0: print(0) s = 0 break elif s > 0: s *= mlist[i] if s >= 10**18: s = -1 if i == N-1 and s != 0: print(s)
N = int(input()) mlist = list(map(int,input().split())) s = 1 for i in range(N): if mlist[i] == 0: print(0) s = 0 break elif s > 0: s *= mlist[i] if s > 10 ** 18: s = -1 if i == N-1 and s != 0: print(s)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,473
374,474
u125409835
python
p02658
n=int(input()) p=input().split() p=list(map(int,p)) mul=1 i=0 if 0 in p: print(0) else: while mul<=100000000000000000 and i!=n: mul=mul*p[i] i+=1 if mul>100000000000000000 or i!=n: print(-1) else: print(mul)
n=int(input()) p=input().split() p=list(map(int,p)) mul=1 i=0 if 0 in p: print(0) else: while mul<=1000000000000000000 and i!=n: mul=mul*p[i] i+=1 if mul>1000000000000000000 or i!=n: print(-1) else: print(mul)
[ "literal.number.integer.change", "control_flow.loop.condition.change", "control_flow.branch.if.condition.change" ]
374,479
374,480
u469685228
python
p02658
n=int(input()) p=input().split() p=list(map(int,p)) mul=1 i=0 if '0' in p: print(0) else: while mul<=100000000000000000 and i!=n: mul=mul*p[i] i+=1 if mul>100000000000000000 or i!=n: print(-1) else: print(mul)
n=int(input()) p=input().split() p=list(map(int,p)) mul=1 i=0 if 0 in p: print(0) else: while mul<=1000000000000000000 and i!=n: mul=mul*p[i] i+=1 if mul>1000000000000000000 or i!=n: print(-1) else: print(mul)
[ "control_flow.branch.if.condition.change", "literal.number.integer.change", "control_flow.loop.condition.change" ]
374,481
374,480
u469685228
python
p02658
#import numpy as np N = int(input()) A = list(map(int, input().split())) #A = np.array(A) t = A[0] for i in range(1,N): t *= A[i] if int(t) > 1e18: for j in range(i,N): if A[j] == 0: t = 0 break print(t) if int(t) <= 1e18: print(int(t)) else: print(-1)
#import numpy as np N = int(input()) A = list(map(int, input().split())) #A = np.array(A) t = A[0] for i in range(1,N): t *= A[i] if int(t) > 1e18: for j in range(i,N): if A[j] == 0: t = 0 break if int(t) <= 1e18: print(int(t)) else: print(-1)
[ "call.remove" ]
374,490
374,491
u553308611
python
p02658
#import numpy as np N = int(input()) A = list(map(int, input().split())) #A = np.array(A) t = A[0] for i in range(N): t *= A[i] if int(t) > 1e18: for j in range(i,N): if A[j] == 0: t = 0 break if int(t) <= 1e18: print(int(t)) else: print(-1)
#import numpy as np N = int(input()) A = list(map(int, input().split())) #A = np.array(A) t = A[0] for i in range(1,N): t *= A[i] if int(t) > 1e18: for j in range(i,N): if A[j] == 0: t = 0 break if int(t) <= 1e18: print(int(t)) else: print(-1)
[ "call.arguments.add" ]
374,492
374,491
u553308611
python
p02658
N=int(input()) S=list(map(int,input().split())) D=sorted(S) A=1 for i in range(0,N): A=A*D[i] if A>=10**18: A=-1 break print(A)
N=int(input()) S=list(map(int,input().split())) D=sorted(S) A=1 for i in range(N): A=A*D[i] if A>10**(18): A=-1 break print(A)
[ "call.arguments.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,493
374,494
u105209986
python
p02658
n = int(input()) arr = [int(x) for x in input().split()] prod = 1 flag = 0 for each in arr: prod = each * prod if prod > 1000000000000000000: flag = 1 break if flag == 0: print(prod) else: print("-1")
n = int(input()) arr = [int(x) for x in input().split()] arr.sort() prod = 1 flag = 0 for each in arr: prod = each * prod if prod > 1000000000000000000: flag = 1 break if flag == 0: print(prod) else: print("-1")
[ "call.add" ]
374,501
374,502
u878838754
python
p02658
import numpy as np N = int(input()) a = np.array(list(map(int, input().split()))) b = 1 for i in range(N): if b > 0: b *= a[i] if a[i] == 0: b = 0 if b > 10**18: b = -1 print(b, end='')
import numpy as np N = int(input()) a = list(map(int, input().split())) b = 1 for i in range(N): if b > 0: b *= a[i] if a[i] == 0: b = 0 if b > 10**18: b = -1 print(b, end='')
[ "call.remove", "call.arguments.change" ]
374,521
374,522
u977650778
python
p02658
import numpy as np N = int(input()) a = np.array(list(map(int, input().split()))) b = 1 for i in range(N): if b > 0: b *= a[i] if a[i] == 0: b = 0 if b > 10**18: b = -1 print(b, end='')
import numpy as np N = int(input()) a = list(map(int, input().split())) b = 1 for i in range(N): if b > 0: b *= a[i] if a[i] == 0: b = 0 if b > 10**18: b = -1 print(b, end='')
[ "call.remove", "call.arguments.change" ]
374,521
374,523
u977650778
python
p02658
n=input() flag=0 flag1=0 a=list(map(int,input().split())) sum=1 a.sort() for i in a : sum*=i if(i==0): flag1=1 if(sum>=1e18) : flag=1 break if(flag==0 or flag1==1): print(sum) else : print(-1)
n=input() flag=0 flag1=0 a=list(map(int,input().split())) sum=1 a.sort() for i in a : sum*=i if(i==0): flag1=1 if(sum>1e18) : flag=1 break if(flag==0 or flag1==1): print(sum) else : print(-1)
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
374,529
374,530
u099891281
python
p02658
import sys N = int(input()) A = list(map(int,input().split())) if 0 in A: print(0) sys.exit() K = 1 for i in range(N): K = A[i]*K print(K) if K > 10**18: print(-1) sys.exit() print(K)
import sys N = int(input()) A = list(map(int,input().split())) if 0 in A: print(0) sys.exit() K = 1 for i in range(N): K = A[i]*K if K > 10**18: print(-1) sys.exit() print(K)
[ "call.remove" ]
374,531
374,532
u039065404
python
p02658
N = int(input()) A = list(map(int,input().split())) finish = 0 result = 1 if 0 in A: print(0) finish = 1 else: for n in range(N): result = result*A[n] if result > 10**18: print(-1) finish = 1 if finish == 0: print(result)
N = int(input()) A = list(map(int,input().split())) finish = 0 result = 1 if 0 in A: print(0) finish = 1 else: for n in range(N): result = result*A[n] if result > 10**18: print(-1) finish = 1 break if finish == 0: print(result)
[ "control_flow.break.add" ]
374,535
374,536
u306497037
python
p02658
N = int(input()) A = list(map(int,input().split())) finish = 0 result = 1 if 0 in A: print(0) finish = 1 else: for n in range(N): result = result*A[n] if result > 1000000000000000000: print(-1) finish = 1 if finish == 0: print(result)
N = int(input()) A = list(map(int,input().split())) finish = 0 result = 1 if 0 in A: print(0) finish = 1 else: for n in range(N): result = result*A[n] if result > 10**18: print(-1) finish = 1 break if finish == 0: print(result)
[ "literal.number.integer.change", "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "control_flow.break.add" ]
374,537
374,536
u306497037
python
p02658
N = int(input()) A = list(map(int, input().split())) if 0 in A: sum = 0 sum = 1 ans = 0 for x in A: sum *= x if sum > 1000000000000000000: ans = -1 break if sum == 0: ans = 0 break if ans < 0: print(ans) else: print(sum)
N = int(input()) A = list(map(int, input().split())) sum = 1 if 0 in A: sum = 0 ans = 0 for x in A: sum *= x if sum > 1000000000000000000: ans = -1 break if sum == 0: ans = 0 break if ans < 0: print(ans) else: print(sum)
[ "assignment.add", "assignment.remove" ]
374,545
374,546
u054652697
python
p02658
import sys N = int(input()) l = list(map(int,input().split())) if 0 in l: print(0) sys.exit() ans = 1 for i in l: ans *= i if ans > 10**18: print(-1) print(ans)
import sys N = int(input()) l = list(map(int,input().split())) if 0 in l: print(0) sys.exit() ans = 1 for i in l: ans *= i if ans > 10**18: print(-1) sys.exit() print(ans)
[ "call.add" ]
374,547
374,548
u360748099
python
p02658
n = int(input()) lst = list(map(int, input().split())) ans = 1 for a in lst: ans *= a if ans > 1e18: print(-1) break else: print(ans)
n = int(input()) lst = list(map(int, input().split())) lst.sort() ans = 1 for a in lst: ans *= a if ans > 1e18: print(-1) break else: print(ans)
[ "call.add" ]
374,551
374,552
u570770016
python
p02658
n = int(input()) a = list(map(int,input().split())) a.sort p = True ans = 1 for i in a : ans *= i if(ans == 0) : print(0) p = False break if(ans > 1000000000000000000): print(-1) p =False break if p: if ans > 1000000000000000000: print(-1) else: print(ans)
n = int(input()) a = list(map(int,input().split())) a.sort() p = True ans = 1 for i in a : ans *= i if(ans == 0) : print(0) p = False break if(ans > 1000000000000000000): print(-1) p =False break if p: if ans > 1000000000000000000: print(-1) else: print(ans)
[ "call.add" ]
374,553
374,554
u507638984
python
p02658
n = int(input()) ls = list(map(int, input().split())) res = 1 if 0 in ls: print(0) for x in ls: res *= x if res > 10**18: print(-1) quit() print(res)
n = int(input()) ls = list(map(int, input().split())) res = 1 if 0 in ls: print(0) quit() for x in ls: res *= x if res > 10**18: print(-1) quit() print(res)
[ "call.add" ]
374,555
374,556
u203471639
python
p02658
N = int(input()) A = input().split() answer = 1 flag = 0 x = 10**18 if '0' in A: print(0) flag = 1 for i in range(N): answer *= int(A[i]) if answer > x: print(-1) flag = 1 break if flag == 0: print(answer)
N = int(input()) A = input().split() answer = 1 flag = 0 x = 10**18 if '0' in A: print(0) flag = 1 if flag == 0: for i in range(N): answer *= int(A[i]) if answer > x: print(-1) flag = 1 break if flag == 0: print(answer)
[ "control_flow.branch.if.add" ]
374,557
374,558
u727051308
python
p02658
N = int(input()) A = list(map(int, input().split())) tmp = 1 for num in A: tmp *= num if tmp > 1e18: break if tmp <= 1e18: print(tmp) elif 0 in tmp: print(0) else: print(-1)
N = int(input()) A = list(map(int, input().split())) tmp = 1 for num in A: tmp *= num if tmp > 1e18: break if tmp <= 1e18: print(tmp) elif 0 in A: print(0) else: print(-1)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
374,562
374,563
u013864607
python
p02658
n = int(input()) arr = [int(x) for x in input().split()] res = 1 flag = False for i in range(n): if flag == False: res *= arr[i] if res == 0: print(0) exit() if res > 10**18: flag = True if res > 10**18: print(-1) else: print(res)
n = int(input()) arr = [int(x) for x in input().split()] res = 1 flag = False for i in range(n): if flag == False: res *= arr[i] if arr[i] == 0: print(0) exit() if res > 10**18: flag = True if res > 10**18: print(-1) else: print(res)
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
374,573
374,574
u217609546
python
p02658
N = int(input()) numbers = [int(n) for n in input().split()] mlt = 1 if 0 in numbers: print(0) for n in numbers: mlt *= n if mlt > 1000000000000000000: mlt = -1 break print(mlt)
N = int(input()) numbers = [int(n) for n in input().split()] mlt = 1 if 0 in numbers: print(0) else: for n in numbers: mlt *= n if mlt > 1000000000000000000: mlt = -1 break print(mlt)
[]
374,579
374,580
u522469665
python
p02658
N = int(input()) numbers = [int(n) for n in input().split()] mlt = 1 if 0 in n: print(0) for n in numbers: mlt *= n if mlt > 1000000000000000000: mlt = -1 break print(mlt)
N = int(input()) numbers = [int(n) for n in input().split()] mlt = 1 if 0 in numbers: print(0) else: for n in numbers: mlt *= n if mlt > 1000000000000000000: mlt = -1 break print(mlt)
[ "identifier.change", "control_flow.branch.if.condition.change" ]
374,581
374,580
u522469665
python
p02658
from functools import reduce from operator import mul import sys input = sys.stdin.readline count = int(input()) list = list(map(int, input().split())) sum = list[0] if 0 in list: print(0) else: for i in range(count - 1): sum = sum * list[i + 1] if sum > 1000000000000000000: print(-1) ...
from functools import reduce from operator import mul import sys input = sys.stdin.readline count = int(input()) list = list(map(int, input().split())) sum = list[0] if 0 in list: print(0) exit() else: for i in range(count - 1): sum = sum * list[i + 1] if sum > 1000000000000000000: ...
[ "call.add" ]
374,582
374,583
u963349415
python
p02658
N=int(input()) A=list(map(int,input().split())) ans=1 if A.count(0) >= 1: print(0) else: B=[i for i in A if i != 1] if len(B) >= 100: print("-1") else: for k in range(len(B)-1): ans=ans*B[k] if ans > 1000000000000000000: print("-1") else: print(ans)
N=int(input()) A=list(map(int,input().split())) ans=1 if A.count(0) >= 1: print(0) else: B=[i for i in A if i != 1] if len(B) >= 100: print("-1") else: for k in range(len(B)): ans=ans*B[k] if ans > 1000000000000000000: print("-1") else: print(ans)
[ "expression.operation.binary.remove" ]
374,584
374,585
u507456172
python