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 | n=int(input())
a_list=list(map(int, input().split()))
multi_sum=1
LIMIT=1000000000000000000
if 0 not in a_list:
for a_i in a_list:
multi_sum*=a_i
if multi_sum > LIMIT:
multi_sum=-1
else:
multi_sum=0
print(multi_sum)
| n=int(input())
a_list=list(map(int, input().split()))
multi_sum=1
LIMIT=1000000000000000000
if 0 not in a_list:
for a_i in a_list:
multi_sum*=a_i
if multi_sum > LIMIT:
multi_sum=-1
break
else:
multi_sum=0
print(multi_sum)
| [
"control_flow.break.add"
] | 375,213 | 375,214 | u760446276 | python |
p02658 | import sys
N = int(input())
A = list(map(int, input().split()))
ans = 1
if A.count(0) == 0:
print(0)
sys.exit()
for i in A:
ans = ans*i
if ans > int(10**18):
print(-1)
sys.exit()
if ans > int(10**18):
print(-1)
else:
print(ans) | import sys
N = int(input())
A = list(map(int, input().split()))
ans = 1
if A.count(0) != 0:
print(0)
sys.exit()
for i in A:
ans = ans*i
if ans > int(10**18):
print(-1)
sys.exit()
if ans > int(10**18):
print(-1)
else:
print(ans) | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,216 | 375,217 | u609814378 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
answer = 1
zero_check = 0 in a
for i in range(n):
answer = a[i] * answer
if zero_check:
print(answer)
break
elif answer > 1000000000000000000:
print(-1)
break
else:
print(answer)
| n = int(input())
a = list(map(int, input().split()))
answer = 1
zero_check = 0 in a
for i in range(n):
answer = a[i] * answer
if zero_check:
print(0)
break
elif answer > 1000000000000000000:
print(-1)
break
else:
print(answer)
| [
"identifier.replace.remove",
"literal.replace.add",
"call.arguments.change",
"io.output.change"
] | 375,225 | 375,226 | u195396655 | python |
p02658 |
from functools import *
import sys
sys.setrecursionlimit(100000)
def acinput():
return list(map(int, input().split(" ")))
N=input()
a=acinput()
if min(a)==0:
print(0)
sys.exit()
res=1
for sa in a:
res*=sa
if res>10**18:
res=-1
print(res)
|
from functools import *
import sys
sys.setrecursionlimit(100000)
def acinput():
return list(map(int, input().split(" ")))
N=input()
a=acinput()
if min(a)==0:
print(0)
sys.exit()
res=1
for sa in a:
res*=sa
if res>10**18:
res=-1
break
print(res)
| [
"control_flow.break.add"
] | 375,237 | 375,238 | u346308892 | python |
p02658 | import sys
input = sys.stdin.readline
N = int(input())
A = map(int, input().split())
A.sort()
ans = 1
for a in A:
ans = ans * a
if ans > 1000000000000000000:
print -1
quit()
print(ans)
| import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 1
for a in A:
ans = ans * a
if ans > 1000000000000000000:
print(-1)
quit()
print(ans)
| [
"call.add",
"call.arguments.change"
] | 375,243 | 375,244 | u471342385 | python |
p02658 | n = int(input())
a = list(map(int, input(). split()))
ans = 1
if a.count(0) >= 1:
print(0)
exit()
for i in range(n):
ans = ans*a[i]
if ans > 10**18:
ans = -1
print(ans) | n = int(input())
a = list(map(int, input(). split()))
ans = 1
if a.count(0) >= 1:
print(0)
exit()
for i in range(n):
ans = ans*a[i]
if ans > 10**18:
ans = -1
break
print(ans) | [
"control_flow.break.add"
] | 375,247 | 375,248 | u571524394 | python |
p02658 | from functools import reduce
N = int(input())
A = map(int, input().split())
if 0 in A:
print(0)
exit()
mul = 1
for n in A:
mul *= n
if mul > 10 ** 18:
print(-1)
exit()
print(mul) | from functools import reduce
N = int(input())
A = [*map(int, input().split())]
if 0 in A:
print(0)
exit()
mul = 1
for n in A:
mul *= n
if mul > 10 ** 18:
print(-1)
exit()
print(mul)
| [] | 375,249 | 375,250 | u958154834 | python |
p02658 |
n = int(input())
A = list(map(int, input().split()))
tmp = 1
A.sort()
#print(A)
if A[0] == 0:
print(0)
for i in range(n):
tmp *= A[i]
if tmp > 10**18:
tmp = -1
print(tmp)
exit()
print(tmp)
|
n = int(input())
A = list(map(int, input().split()))
tmp = 1
A.sort()
#print(A)
if A[0] == 0:
print(0)
exit()
for i in range(n):
tmp *= A[i]
if tmp > 10**18:
tmp = -1
print(tmp)
exit()
print(tmp) | [
"call.add"
] | 375,251 | 375,252 | u304593245 | python |
p02658 | n=int(input())
a=map(int,input().split())
val = 1
exceed = 0
for i in a:
if(exceed==0):
val*=i
if(val==0):
print(0)
exit(0)
if(val>1000000000000000000):
exceed=1
if(exceed==0):
print(val)
else:
print(-1) | n=int(input())
a=map(int,input().split())
val = 1
exceed = 0
for i in a:
if(exceed==0 or i==0):
val*=i
if(val==0):
print(0)
exit(0)
if(val>1000000000000000000):
exceed=1
if(exceed==0):
print(val)
else:
print(-1) | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 375,257 | 375,258 | u325959156 | python |
p02658 | n=int(input())
a=map(int,input().split())
x=10**18
ans=1
if 0 in a:
ans=0
else:
for i in a:
ans=ans*i
if(ans>x):
ans=-1
break
print(ans) | n=int(input())
a=list(map(int,input().split()))
x=10**18
ans=1
if 0 in a:
ans=0
else:
for i in a:
ans=ans*i
if(ans>x):
ans=-1
break
print(ans) | [
"call.add",
"call.arguments.change"
] | 375,264 | 375,265 | u481550011 | python |
p02658 | n=int(input())
a=map(int,input().split())
x=10**18
ans=1
if 0 in a:
ans=0
else:
for i in a:
ans=ans*i
if(ans>x):
ans=-1
print(ans) | n=int(input())
a=list(map(int,input().split()))
x=10**18
ans=1
if 0 in a:
ans=0
else:
for i in a:
ans=ans*i
if(ans>x):
ans=-1
break
print(ans) | [
"call.add",
"call.arguments.change",
"control_flow.break.add"
] | 375,266 | 375,265 | u481550011 | python |
p02658 | # -*- coding: utf-8 -*-
N = int(input())
numlist = list(map(int, input().split()))
if 0 < numlist.count(0):
print('0')
quit()
total = 1
for i in numlist:
total *= abs(i)
if 10 ** 18 < total:
print('-1')
quit()
print(sign * total) | # -*- coding: utf-8 -*-
N = int(input())
numlist = list(map(int, input().split()))
if 0 < numlist.count(0):
print('0')
quit()
total = 1
for i in numlist:
total *= i
if 10 ** 18 < total:
print('-1')
quit()
print(total) | [
"call.remove",
"call.arguments.change",
"expression.operation.binary.remove"
] | 375,269 | 375,268 | u517630860 | python |
p02658 | n = int(input())
a = list(map(int,input().split()))
MV = 10**18
ans =1
if 0 in a :
print(-1)
exit()
for ele in a:
ans *= ele
if ans > MV :
print(-1)
exit()
print(ans)
| n = int(input())
a = list(map(int,input().split()))
MV = 10**18
ans =1
if 0 in a :
print(0)
exit()
for ele in a:
ans *= ele
if ans > MV :
print(-1)
exit()
print(ans)
| [
"call.arguments.change",
"io.output.change",
"expression.operation.unary.remove"
] | 375,270 | 375,271 | u094158322 | python |
p02658 | n = int(input())
a = list(map(int,input().split()))
MV = 10**18
ans =1
if 0 in a :
print(-1)
for ele in a:
ans *= ele
if ans > MV :
print(-1)
exit()
print(ans)
| n = int(input())
a = list(map(int,input().split()))
MV = 10**18
ans =1
if 0 in a :
print(0)
exit()
for ele in a:
ans *= ele
if ans > MV :
print(-1)
exit()
print(ans)
| [
"call.arguments.change",
"io.output.change",
"expression.operation.unary.remove",
"call.add"
] | 375,272 | 375,271 | u094158322 | python |
p02658 | N = int(input())
A = list(map(int,input().split()))
MAX = 10**18
ret = 1
flag = True
if 0 in A:
print(0)
else:
for a in A:
ret *= a
if ret > MAX:
print('-1')
flag = False
break
if flag and ret < MAX:
print(ret) | N = int(input())
A = list(map(int,input().split()))
MAX = 10**18
ret = 1
flag = True
if 0 in A:
print(0)
else:
for a in A:
ret *= a
if ret > MAX:
print(-1)
flag = False
break
if flag and ret <= MAX:
print(ret) | [
"call.arguments.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,276 | 375,277 | u290886932 | python |
p02658 | N = int(input())
A = list(map(int,input().split()))
MAX = 10**18
ret = 1
flag = True
if 0 in A:
print(0)
else:
for a in A:
ret *= a
if ret > MAX:
print(-1)
flag = False
break
if flag and ret < MAX:
print(ret) | N = int(input())
A = list(map(int,input().split()))
MAX = 10**18
ret = 1
flag = True
if 0 in A:
print(0)
else:
for a in A:
ret *= a
if ret > MAX:
print(-1)
flag = False
break
if flag and ret <= MAX:
print(ret) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,278 | 375,277 | u290886932 | python |
p02658 | N=int(input())
a=list(map(int,input().split()))
import sys
for i in range(N):
if a[i]==0:
print (0)
sys.exit()
p=1
for i in range(N):
p=p*a[i]
if p>10**18:
print (-1,p)
sys.exit()
if p>10**18:
print (-1)
else:
print(p) | N=int(input())
a=list(map(int,input().split()))
import sys
for i in range(N):
if a[i]==0:
print (0)
sys.exit()
p=1
for i in range(N):
p=p*a[i]
if p>10**18:
print (-1)
sys.exit()
if p>10**18:
print (-1)
else:
print(p) | [
"call.arguments.change"
] | 375,294 | 375,295 | u685684561 | python |
p02658 | # -*- coding: utf-8 -*-
import math
n = int(input())
a = list(map(int, input().split()))
q = 1
f = 0
for i in a:
q *= i
if q > 10**18:
f = 1
break
if f == 1:
print(-1)
else:
print(q) | # -*- coding: utf-8 -*-
import math
n = int(input())
a = list(map(int, input().split()))
a.sort()
q = 1
f = 0
for i in a:
q *= i
if q > 10**18:
f = 1
break
if f == 1:
print(-1)
else:
print(q) | [
"call.add"
] | 375,298 | 375,299 | u021763820 | python |
p02658 | def sol():
n = int(input())
mul = 1
arr = list(map(int, input().split()))
for i in arr:
mul*=i
if(mul>10**18):
print(-1)
return
print(mul)
sol() | def sol():
n = int(input())
mul = 1
arr = list(map(int, input().split()))
arr.sort()
for i in arr:
mul*=i
if(mul>10**18):
print(-1)
return
print(mul)
sol() | [
"call.add"
] | 375,310 | 375,311 | u537818901 | python |
p02658 | n = int(input())
a = map(int, input().split())
total = 1
if 0 in a:
total = 0
else:
for i in a:
total *= i
if total > 10 ** 18:
total = -1
break
print(total) | n = int(input())
a = list(map(int, input().split()))
total = 1
if 0 in a:
total = 0
else:
for i in a:
total *= i
if total > 10 ** 18:
total = -1
break
print(total) | [
"call.add",
"call.arguments.change"
] | 375,316 | 375,317 | u123849536 | python |
p02658 | N = int(input())
A = map(int,input().split())
def kake(a):
res=1
for i in a:
res*=i
if res > 10**18:
return -1
else:
return res
print(kake(A)) | N = int(input())
A = map(int,input().split())
def kake(a):
res=1
for i in sorted(a):
res*=i
if res > 10**18:
return -1
else:
return res
print(kake(A)) | [
"call.add",
"call.arguments.change"
] | 375,318 | 375,319 | u750058957 | python |
p02658 | import sys
ans = 1
N = int(input())
A = list(map(int, input().split()))
if A.count(0):
print(0)
else:
for _ in range(N):
ans *= A[_]
if ans >= pow(10,18):
print(-1)
sys.exit()
print(ans)
| import sys
ans = 1
N = int(input())
A = list(map(int, input().split()))
if A.count(0):
print(0)
else:
for _ in range(N):
ans *= A[_]
if ans > pow(10,18):
print(-1)
sys.exit()
print(ans)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,321 | 375,322 | u228636605 | 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)
| [
"control_flow.break.add"
] | 375,333 | 375,334 | u655048024 | python |
p02658 | n = int(input())
a=list(map(int,input().split()))
if 0 in a:
result=0
else:
result = 1
for i in range(n):
result *= a[i]
print(result)
if result>1000000000000000000:
result = -1
print(result)
| n = int(input())
a=list(map(int,input().split()))
if 0 in a:
result=0
else:
result = 1
for i in range(n):
result *= a[i]
if result>1000000000000000000:
result = -1
break
print(result)
| [
"call.remove",
"control_flow.break.add"
] | 375,335 | 375,336 | u984592063 | python |
p02658 |
ans = 1
n = int(input())
arr = list(map(int , input().split()))
f = 1
for i in range(n):
ans*=arr[i]
if ans >= 10**18:
f = 0
break
if f: print(ans)
else: print(-1)
| ans = 1
n = int(input())
arr = sorted(list(map(int , input().split())))
f = 1
for i in range(n):
ans*=arr[i]
#print(ans)
if ans > 10**18:
f = 0
break
#print(ans)
if f: print(ans)
else: print(-1)
| [
"call.add",
"call.arguments.change",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,338 | 375,339 | u733581231 | python |
p02658 | ans = 1
n = int(input())
arr = list(map(int , input().split()))
f = 1
for i in range(n):
ans*=arr[i]
if ans > 10**18:
f = 0
break
if f: print(ans)
else: print(-1) | ans = 1
n = int(input())
arr = sorted(list(map(int , input().split())))
f = 1
for i in range(n):
ans*=arr[i]
#print(ans)
if ans > 10**18:
f = 0
break
#print(ans)
if f: print(ans)
else: print(-1)
| [
"call.add",
"call.arguments.change"
] | 375,340 | 375,339 | u733581231 | 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**8:
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) | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 375,349 | 375,350 | u216752093 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
mul = 1
if 0 in set(a): print(0)
else:
iter = 0
for i in range(n):
mul *= a[i]
if mul > 1e18:
mul = -1
break
print(mul) | n = int(input())
a = list(map(int, input().split()))
mul = 1
if 0 in set(a): mul = 0
else:
iter = 0
for i in range(n):
mul *= a[i]
if mul > 1e18:
mul = -1
break
print(mul) | [
"call.arguments.change"
] | 375,353 | 375,354 | u343021464 | python |
p02658 | N=int(input())
array=input().split(" ")
sum=1
for j in range(N):
if array[j]=="0":
sum=0
if sum!=0:
for i in range(N):
sum=sum*int(array[i])
if sum>1000000000000000000:
sum=-1
break
else:
continue
break
| N=int(input())
array=input().split(" ")
sum=1
for j in range(N):
if array[j]=="0":
sum=0
if sum!=0:
for i in range(N):
sum=sum*int(array[i])
if sum>1000000000000000000:
sum=-1
break
else:
continue
break
print(sum) | [
"call.add"
] | 375,361 | 375,362 | u551906883 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
ans = 1
if a[-1] == 0:
ans = 0
else:
for i in range(n):
ans *= a[i]
if ans >= 10**18:
ans = -1
break
elif a[i] == 1:
break
print(ans) | n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
ans = 1
if a[-1] == 0:
ans = 0
else:
for i in range(n):
ans *= a[i]
if ans > 10**18:
ans = -1
break
elif a[i] == 1:
break
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,366 | 375,367 | u326775883 | python |
p02658 | N=int(input())
a=list(map(int,input().split()))
ans=1
for i in range(N):
if a[i]==0:
print(0)
break
else:
ans*=a[i]
if ans>10**18:
print(-1)
break
else:
print(ans) | N=int(input())
a=list(map(int,input().split()))
ans=1
a=sorted(a)
for i in range(N):
if a[i]==0:
print(0)
break
else:
ans*=a[i]
if ans>10**18:
print(-1)
break
else:
print(ans) | [
"assignment.add"
] | 375,370 | 375,371 | u387080888 | python |
p02658 | # B
N = int(input())
A = [int(i) for i in input().split()]
if 0 in A:
print(0)
else:
result = 1
for i in range(len(A)):
result = result * A[i]
print(result)
if result > 1000000000000000000:
result = -1
break
print(result) | # B
N = int(input())
A = [int(i) for i in input().split()]
if 0 in A:
print(0)
else:
result = 1
for i in range(len(A)):
result = result * A[i]
if result > 1000000000000000000:
result = -1
break
print(result) | [
"call.remove"
] | 375,374 | 375,375 | u190905976 | python |
p02658 | n=int(input())
x = [int(i) for i in input().split()]
print(x)
mul=1
check=10**18
count=x.count(0)
if(count>=1):
print("0")
else:
for i in range(n):
mul*=int(x[i])
if(check<mul):
break
if(check<mul):
print("-1")
else:
print(mul) | n=int(input())
x = [int(i) for i in input().split()]
mul=1
check=10**18
count=x.count(0)
if(count>=1):
print("0")
else:
for i in range(n):
mul*=int(x[i])
if(check<mul):
break
if(check<mul):
print("-1")
else:
print(mul) | [
"call.remove"
] | 375,380 | 375,381 | u396829869 | python |
p02658 | import sys
# from collections import defaultdict
# from collections import Counter
# from queue import Queue
import math
def main():
N = int(input())
As = [int(s) for s in input().split()]
logsum = 0
prod = 1
for a in As:
if a == 0:
print('0')
return
logsum... | import sys
# from collections import defaultdict
# from collections import Counter
# from queue import Queue
import math
def main():
N = int(input())
As = [int(s) for s in input().split()]
logsum = 0
prod = 1
for a in As:
if a == 0:
print('0')
return
logsum... | [
"control_flow.branch.if.condition.change",
"expression.operator.compare.change"
] | 375,382 | 375,383 | u558528117 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
m = 10**18
if 0 in a:
print(0)
exit()
res = 1
for i in a:
res *= i
print(res)
if res > m:
print(-1)
exit()
print(res) | n = int(input())
a = list(map(int, input().split()))
m = 10**18
if 0 in a:
print(0)
exit()
res = 1
for i in a:
res *= i
if res > m:
print(-1)
exit()
print(res) | [
"call.remove"
] | 375,384 | 375,385 | u538632589 | python |
p02658 | n = int(input())
str_list = input().split()
list = [int(k) for k in str_list]
list.sort(reverse=True)
result = 1
if(0 in list):
print('0')
exit()
for i in range(n):
result = result * list[i]
if(result >= 1000000000000000000):
print('-1')
exit()
print(result)
| n = int(input())
str_list = input().split()
list = [int(k) for k in str_list]
list.sort(reverse=True)
result = 1
if(0 in list):
print('0')
exit()
for i in range(n):
result = result * list[i]
if(result > 1000000000000000000):
print('-1')
exit()
print(result)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,399 | 375,400 | u580126681 | python |
p02658 | N = int(input())
A = map(int,input().split())
ret = 1
if 0 in A:
print(0)
exit()
for i in A:
ret *= i
if ret > 10**18:
ret = -1
break
print(ret)
| N = int(input())
A = list(map(int,input().split()))
ret = 1
if 0 in A:
print(0)
exit()
for i in A:
ret *= i
if ret > 10**18:
ret = -1
break
print(ret)
| [
"call.add",
"call.arguments.change"
] | 375,401 | 375,402 | u092061507 | python |
p02658 | n = int(input())
a_list = sorted([int(i) for i in input().split()])
if a_list[0] == 0:
print(0)
else:
ans = 1
for i in a_list:
ans *= i
if i > 10**18:
ans = -1
break
print(ans) | n = int(input())
a_list = sorted([int(i) for i in input().split()])
if a_list[0] == 0:
print(0)
else:
ans = 1
for i in a_list:
ans *= i
if ans > 10**18:
ans = -1
break
print(ans) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 375,410 | 375,411 | u230717961 | python |
p02658 | n = int(input())
a_list = sorted([int(i) for i in input().split()])
if a[0] == 0:
print(0)
else:
ans = 1
for i in a_list:
ans *= i
if i > 10**18:
ans = -1
break
print(ans) | n = int(input())
a_list = sorted([int(i) for i in input().split()])
if a_list[0] == 0:
print(0)
else:
ans = 1
for i in a_list:
ans *= i
if ans > 10**18:
ans = -1
break
print(ans) | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 375,412 | 375,411 | u230717961 | python |
p02658 | n = int(input())
alist = list(map(int, input().split(" ")))
if 0 in alist:
print("0")
else:
result = 1
m = 0
while result <= 10**18:
result *= alist[m]
m += 1
if m < n or result > 10**18:
print("-1")
else:
print(result) | n = int(input())
alist = list(map(int, input().split(" ")))
if 0 in alist:
print("0")
else:
result = 1
m = 0
while result <= 10**18 and m < n:
result *= alist[m]
m += 1
if m < n or result > 10**18:
print("-1")
else:
print(result) | [
"control_flow.loop.condition.change"
] | 375,414 | 375,415 | u747391638 | python |
p02658 | import sys
import copy
from collections import deque
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
maxr = 10**18
_ = ni()
a = na()
res = 1
if 0 in a:
print(0)
exit(0)
for item in a:
res *= i... | import sys
import copy
from collections import deque
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
maxr = 10**18
_ = ni()
a = na()
res = 1
if 0 in a:
print(0)
exit(0)
for item in a:
res *= i... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,416 | 375,417 | u008992227 | 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]
print(ans)
if ans > 1000000000000000000:
ans = -1
break
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 > 1000000000000000000:
ans = -1
break
print(ans) | [
"call.remove"
] | 375,423 | 375,424 | u022846086 | 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
break
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 :
ans = -1
break
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,433 | 375,434 | u843073153 | python |
p02658 | import sys
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
if A[i]==o:
print("0")
sys.exit()
for i in range(N):
pai=pai*A[i]
if pai>10**18:
print("-1")
hantei=int(1)
break
if hantei==0:
print(pai)
| import sys
N=int(input())
A=[]
pai=int(1)
hantei=int(0)
A=list(map(int,input().split()))
for i in range(N):
if A[i]==0:
print("0")
sys.exit()
for i in range(N):
pai=pai*A[i]
if pai>10**18:
print("-1")
hantei=int(1)
break
if hantei==0:
print(pai)
| [
"misc.typo",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.branch.if.condition.change"
] | 375,435 | 375,436 | u262039080 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
an = 1
for x in a:
an *= x
if (an > 10**18):
print(-1)
exit(0)
print(an) | n = int(input())
a = list(map(int, input().split()))
a.sort()
an = 1
for x in a:
an *= x
if (an > 10**18):
print(-1)
exit(0)
print(an) | [
"call.add"
] | 375,443 | 375,444 | u548163222 | python |
p02658 | n = int(input())
a = map(int, input().split());
a.sort()
ans = 1
above = False
for x in a:
ans *= x
if ans > 10**18:
above = True
break
if not above:
print(ans)
else:
print(-1) | n = int(input())
a = list(map(int, input().split()));
a.sort()
ans = 1
above = False
for x in a:
ans *= x
if ans > 10**18:
above = True
break
if not above:
print(ans)
else:
print(-1) | [
"call.add",
"call.arguments.change"
] | 375,448 | 375,449 | u712768978 | python |
p02658 | N=int(input())
A=list(map(int,input().split()))
flag=0
for i in range(N):
if A[i]==0:
flag=1
sflag=0
ans=1
for i in range(N):
ans*=A[i]
if ans>10**18:
sflag=1
break
if sflag==1:
break
if sflag==0:
print(ans)
elif sflag==1 and flag==0:
print("0")
else:
print("-1") | N=int(input())
A=list(map(int,input().split()))
flag=0
for i in range(N):
if A[i]==0:
flag=1
sflag=0
ans=1
for i in range(N):
ans*=A[i]
if ans>10**18:
sflag=1
break
if sflag==1:
break
if sflag==0:
print(ans)
elif sflag==1 and flag==1:
print("0")
else:
print("-1") | [
"literal.number.integer.change",
"control_flow.branch.if.condition.change"
] | 375,450 | 375,451 | u166340293 | python |
p02658 | n=int(input())
l=list(map(int,input().split()))
ans=1
f=1
i=0
for i in range(n):
if ans<=10**18:
ans=ans*l[i]
else:
f=0
if f==1 and ans<=10**18:
print(ans)
else:
print(-1) | n=int(input())
l=list(map(int,input().split()))
l.sort()
ans=1
f=1
i=0
for i in range(n):
if ans<=10**18:
ans=ans*l[i]
else:
f=0
if f==1 and ans<=10**18:
print(ans)
else:
print(-1)
| [
"call.add"
] | 375,452 | 375,453 | u015187377 | python |
p02658 | input()
r = 1
for x in map(int, input().split()):
if x == 0:
r = 0
break
if r > 0:
r *= x
if r > 1e18:
r = -1
break
print(r)
| input()
r = 1
for x in map(int, input().split()):
if x == 0:
r = 0
break
if r > 0:
r *= x
if r > 1e18:
r = -1
print(r) | [
"control_flow.break.remove"
] | 375,454 | 375,455 | u021019433 | python |
p02658 | import sys
N = int(input())
nums = list(map(int, input().split(' ')))
output = 1
if 0 in nums:
print(0)
sys.exit()
else:
for x in nums:
output *= x
if output >= 10**18:
print('-1')
sys.exit()
print(output) | import sys
N = int(input())
nums = list(map(int, input().split(' ')))
output = 1
if 0 in nums:
print(0)
sys.exit()
else:
for x in nums:
output *= x
if output > 10**18:
print(-1)
sys.exit()
print(output) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 375,456 | 375,457 | u201565171 | python |
p02658 | import sys
N = int(input())
nums = list(map(int, input().split(' ')))
output = 1
if 0 in nums:
print(0)
sys.exit()
else:
for x in nums:
output *= x
if output >= 10**18:
print(-1)
sys.exit()
print(output) | import sys
N = int(input())
nums = list(map(int, input().split(' ')))
output = 1
if 0 in nums:
print(0)
sys.exit()
else:
for x in nums:
output *= x
if output > 10**18:
print(-1)
sys.exit()
print(output) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,458 | 375,457 | u201565171 | python |
p02658 | N = int(input())
org = input().split()
for i in range(len(org)):
org[i] = int(org[i])
A = sorted(org)
print(A)
answer = A[0]
overl = False
for i in range(N-1):
answer *= A[i+1]
if answer > 10**18:
overl = True
break
if overl:
print("-1")
else:
print(answer) | N = int(input())
org = input().split()
for i in range(len(org)):
org[i] = int(org[i])
A = sorted(org)
answer = A[0]
overl = False
for i in range(N-1):
answer *= A[i+1]
if answer > 10**18:
overl = True
break
if overl:
print("-1")
else:
print(answer) | [
"call.remove"
] | 375,460 | 375,461 | u247540845 | python |
p02658 | N = int(input())
nums = list(map(int, input().split()))
if 0 in nums:
print(0)
exit()
result = 1
for num in nums:
result *= num
if result >= 10 ** 18:
print(-1)
exit()
print(result)
| N = int(input())
nums = list(map(int, input().split()))
if 0 in nums:
print(0)
exit()
result = 1
for num in nums:
result *= num
if result > 10 ** 18:
print(-1)
exit()
print(result)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,464 | 375,465 | u521020719 | python |
p02658 | N = int(input())
nums = list(map(int, input().split()))
if 0 in nums:
print(0)
exit()
result = 1
for num in nums:
result *= num
if result >= 10 ** 18:
print(-1)
else:
print(result)
| N = int(input())
nums = list(map(int, input().split()))
if 0 in nums:
print(0)
exit()
result = 1
for num in nums:
result *= num
if result > 10 ** 18:
print(-1)
exit()
print(result)
| [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 375,467 | 375,465 | u521020719 | python |
p02658 | import sys
import math
import itertools
import collections
import heapq
import numpy as np
rl = sys.stdin.readline
n = int(rl())
a = list(map(int, rl().split()))
if 0 in a:
print(0)
else:
ans = 1
for i in a:
ans *= i
if ans > 10**18:
print(-1)
else:
print(ans) | import sys
import math
import itertools
import collections
import heapq
import numpy as np
rl = sys.stdin.readline
n = int(rl())
a = list(map(int, rl().split()))
if 0 in a:
print(0)
else:
ans = 1
for i in a:
ans *= i
if ans > 10**18:
print(-1)
exit()
else:
... | [
"call.add"
] | 375,472 | 375,473 | u823885866 | python |
p02658 | import math
n = int(input())
a = list(map(int,input().split()))
flag_zero=0
sum = 0
for i in range(n):
if a[i]==0:
flag_zero=1
else:
sum += math.log10(a[i])
if flag_zero == 1:
print(0)
elif sum >= 18:
print(-1)
else:
sum = 1
for i in range(n):
sum *= a[i]
if sum > 10**18:
print(-1)
el... | import math
n = int(input())
a = list(map(int,input().split()))
flag_zero = 0
sum = 0
for i in range(n):
if a[i]==0:
flag_zero = 1
else:
sum += math.log10(a[i])
if flag_zero == 1:
print(0)
elif sum > 18:
print(-1)
else:
sum = 1
for i in range(n):
sum *= a[i]
if sum > 10**18:
print(-1)
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,482 | 375,483 | u406767170 | python |
p02658 | # your code goes here
n = int(input())
a = input().split()
res = 1
zero = 0
for e in range(n):
if e == 0:
zero = 1
for e in range(n):
res *= int(a[e])
if res > 1000000000000000000:
break
if zero == 1:
print(0)
elif res > 1000000000000000000:
print(-1)
else:
print(res) | # your code goes here
n = int(input())
a = input().split()
res = 1
zero = 0
for e in range(n):
if int(a[e]) == 0:
zero = 1
for e in range(n):
res *= int(a[e])
if res > 1000000000000000000:
break
if zero == 1:
print(0)
elif res > 1000000000000000000:
print(-1)
else:
print(res) | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"call.add",
"call.arguments.add"
] | 375,484 | 375,485 | u558932457 | python |
p02658 | import sys
MAX = 10**18
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
print("0")
else:
res = 1
for a in reversed(sorted(A)):
if res == 1:
break
res *= a
if res > MAX:
print("-1")
sys.exit()
print(res)
| import sys
MAX = 10**18
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
print("0")
else:
res = 1
for a in reversed(sorted(A)):
if a == 1:
break
res *= a
if res > MAX:
print("-1")
sys.exit()
print(res)
| [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 375,486 | 375,487 | u676933207 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
res = 1
for a_i in a:
if 0 == a_i:
print(0)
exit(0)
elif res > 10 ** 18 or res:
continue
else:
res *= a_i
print(-1 if res > 10 ** 18 else res)
| n = int(input())
a = list(map(int, input().split()))
res = 1
for a_i in a:
if 0 == a_i:
print(0)
exit(0)
elif res > 10 ** 18:
continue
else:
res *= a_i
print(-1 if res > 10 ** 18 else res)
| [
"control_flow.loop.for.condition.change"
] | 375,492 | 375,493 | u706929073 | python |
p02658 | # B
n = int(input())
a = map(int,input().split())
maxa = 10 **18
ans = 1
if min(a) == 0:
ans = 0
for i in a:
ans = ans * i
if ans > maxa:
print(-1)
break
else:
print(ans)
| # B
n = int(input())
a = list(map(int,input().split()))
maxa = 10 **18
ans = 1
if min(a) == 0:
ans = 0
for i in a:
ans = ans * i
if ans > maxa:
print(-1)
break
else:
print(ans)
| [
"call.add",
"call.arguments.change"
] | 375,497 | 375,498 | u441254033 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
m = 1
if 0 in a:
m = 0
else:
for i in a:
m *= i
if m > 10**18:
m = -1
print(m)
| n = int(input())
a = list(map(int, input().split()))
m = 1
if 0 in a:
m = 0
else:
for i in a:
m *= i
if m > 10**18:
m = -1
break
print(m)
| [
"control_flow.break.add"
] | 375,503 | 375,504 | u628335443 | python |
p02658 | n=int(input())
cnt=1
a=list(map(int,input().split()))
for it in a:
cnt*=it
if cnt>1000000000000000000:
print(-1)
exit()
if cnt>1000000000000000000:
print(-1)
else:
print(cnt)
| n=int(input())
cnt=1
a=sorted(list(map(int,input().split())))
for it in a:
cnt*=it
if cnt>1000000000000000000:
print(-1)
exit()
if cnt>1000000000000000000:
print(-1)
else:
print(cnt)
| [
"call.add",
"call.arguments.change"
] | 375,509 | 375,510 | u073057072 | 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 * ans
print(ans)
if ans > 10**18:
ans = -1
break
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 * ans
if ans > 10**18:
ans = -1
break
print(ans)
| [
"call.remove"
] | 375,515 | 375,516 | u325660636 | python |
p02658 | n=int(input())
a=list(map(int,input().split()))
t=1
for i in a:
t*=i
if t>10**18:
t=-1
break
print(t) | n=int(input())
a=list(map(int,input().split()))
a.sort()
t=1
for i in a:
t*=i
if t>10**18:
t=-1
break
print(t) | [
"call.add"
] | 375,517 | 375,518 | u813174766 | python |
p02658 | 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)
| n = int(input())
a = list(map(int, input().split()))
ans=1
if 0 in a:
print(0)
exit()
else:
for i in range(n):
ans *= a[i]
if ans > (10 ** 18):
print('-1')
exit()
print(ans)
| [
"call.add"
] | 375,523 | 375,524 | u071010598 | python |
p02658 | n=int(input())
a=list(map(int,input().split()))
a=sorted(a,reverse=True)
mod=10**18
cnt=1
for i in range(n):
cnt*=a[i]
if cnt>mod:
print(-1)
exit()
print(cnt) | n=int(input())
a=list(map(int,input().split()))
a=sorted(a)
mod=10**18
cnt=1
for i in range(n):
cnt*=a[i]
if cnt>mod:
print(-1)
exit()
print(cnt) | [
"call.arguments.change"
] | 375,525 | 375,526 | u068750695 | python |
p02658 | n = int(input())
a = list(map(int, input().split()))
ans = 1
flag =0
for i in a:
if i == 0:
flag=2
break
for i in a:
ans = ans*i
if ans > 10 ** 18:
flag=1
break
if flag==1:
print(-1)
elif flag ==2:
print(0)
else:
print(ans)
| n = int(input())
a = list(map(int, input().split()))
ans = 1
flag =0
for i in a:
if i == 0:
flag=2
break
if flag!= 2:
for i in a:
ans = ans*i
if ans > 10 ** 18:
flag=1
break
if flag==1:
print(-1)
elif flag ==2:
print(0)
else:
print(ans)
| [
"control_flow.branch.if.add"
] | 375,531 | 375,532 | u339851548 | python |
p02658 | N = int(input())
A = list(map(int,input().split()))
ans = 1
for i in range(N):
if ans > 10**18+1:
break
else:
ans = ans * A[i]
if 0 in A:
print(0)
elif ans > 10**18+1:
print(-1)
else:
print(ans)
| N = int(input())
A = list(map(int,input().split()))
ans = 1
for i in range(N):
if ans > 10**18+1:
break
else:
ans = ans * A[i]
if 0 in A:
print(0)
elif ans > 10**18:
print(-1)
else:
print(ans)
| [
"expression.operation.binary.remove"
] | 375,533 | 375,534 | u166621202 | python |
p02658 | N = int(input())
A = list(map(int, input().split()))
if 0 in A:
print(0)
else:
ans = A[0]
for i in range(1, N):
ans *= A[i]
if ans > 10**18:
print(ans)
ans = -1
break
print(ans) | N = int(input())
A = list(map(int, input().split()))
if 0 in A:
print(0)
else:
ans = A[0]
for i in range(1, N):
ans *= A[i]
if ans > 10**18:
ans = -1
break
print(ans) | [
"call.remove"
] | 375,537 | 375,538 | u550633907 | python |
p02658 | x = input()
y = [int(a) for a in input().split(" ")]
if 0 in y:
print(0)
exit(0)
res = 1
for i in y:
res *= i
print(res)
if res > int(1e+18):
print(-1)
exit(0)
print(res) | x = input()
y = [int(a) for a in input().split(" ")]
if 0 in y:
print(0)
exit(0)
res = 1
for i in y:
res *= i
if res > int(1e+18):
print(-1)
exit(0)
print(res) | [
"call.remove"
] | 375,541 | 375,542 | u076566148 | python |
p02658 | N = int(input())
A = list(map(int,input().split()))
list.sort(A)
ans = 1
for a in A:
ans *= a
if ans > 1e18:
ans = -1
exit()
print(ans)
| N = int(input())
A = list(map(int,input().split()))
list.sort(A)
ans = 1
for a in A:
ans *= a
if ans > 1e18:
print(-1)
exit()
print(ans)
| [
"call.arguments.change"
] | 375,543 | 375,544 | u783676040 | python |
p02658 | n = int(input())
num_list = list(map(int,input().split()))
ans = 1
if 0 in num_list:
print(0)
else:
for i in num_list:
print(ans)
ans *= i
if ans > 10**18:
break
if ans > 10**18:
print(-1)
else:
print(ans)
| n = int(input())
num_list = list(map(int,input().split()))
ans = 1
if 0 in num_list:
print(0)
else:
for i in num_list:
ans *= i
if ans > 10**18:
break
if ans > 10**18:
print(-1)
else:
print(ans)
| [
"call.remove"
] | 375,545 | 375,546 | u549383771 | python |
p02658 | N = int(input())
A = map(int, input().split())
ans = 1
if 0 in A:
ans = 0
else:
for num in A:
ans *= num
if ans > 1e18:
ans = -1
break
print(ans) | N = int(input())
A = list(map(int, input().split()))
ans = 1
if 0 in A:
ans = 0
else:
for num in A:
ans *= num
if ans > 1e18:
ans = -1
break
print(ans) | [
"call.add",
"call.arguments.change"
] | 375,549 | 375,550 | u926412290 | python |
p02658 | N=int(input())
Alist=list(map(int,input().split()))
multi=Alist[0]
ibreak=0
if(Alist.count(0)>=0):
print(0)
else:
for i in range (N-1):
multi*=Alist[i+1]
if(multi>1e18):
print(-1)
ibreak=1
break;
if(ibreak==0):
print(multi) | N=int(input())
Alist=list(map(int,input().split()))
multi=Alist[0]
ibreak=0
if(Alist.count(0)>0):
print(0)
else:
for i in range (N-1):
multi*=Alist[i+1]
if(multi>1e18):
print(-1)
ibreak=1
break;
if(ibreak==0):
print(multi) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,555 | 375,556 | u442855260 | python |
p02658 | def f():
n = int(input())
x = int(1e18)
arr = list(map(int, input().split(' ')))
ans = 1
for i in arr:
ans = ans * i
if ans > x:
print(-1)
return
print(ans)
f()
| def f():
n = int(input())
x = int(1e18)
arr = list(map(int, input().split(' ')))
arr.sort()
ans = 1
for i in arr:
# print(i)
ans = ans * i
if ans > x:
print(-1)
return
print(ans)
f()
| [
"call.add"
] | 375,561 | 375,562 | u613591784 | python |
p02658 | N = int(input())
A = list(map(int,input().split()))
if A.count(0) == 0:
k = 1
for i in range(N):
k = k * A[i]
if k >= 10 ** 18:
k = -1
break
else:
k = 0
print(k) | N = int(input())
A = list(map(int,input().split()))
if A.count(0) == 0:
k = 1
for i in range(N):
k = k * A[i]
if k >= 10 ** 18 + 1:
k = -1
break
else:
k = 0
print(k) | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one"
] | 375,563 | 375,564 | u278260569 | python |
p02658 | n = int(input())
a = set(map(int, input().split()))
result = 1
if 0 in a:
result = 0
else:
for i in a:
result = result * i
if result > 10**18:
result = -1
break
print(result) | n = int(input())
a = list(map(int, input().split()))
result = 1
if 0 in a:
result = 0
else:
for i in a:
result = result * i
if result > 10**18:
result = -1
break
print(result) | [
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 375,571 | 375,572 | u000513658 | python |
p02658 | n=int(input())
hoge=list(map(int,input().split()))
ans=1
flag=True
if(min(hoge)==0):
print(0)
flag=False
else:
for i in range(n):
ans=ans*hoge[i]
if(ans>=10**18):
print(-1)
flag=False
break
if(flag):
print(ans) | n=int(input())
hoge=list(map(int,input().split()))
ans=1
flag=True
if(min(hoge)==0):
print(0)
flag=False
else:
for i in range(n):
ans=ans*hoge[i]
if(ans>10**18):
print(-1)
flag=False
break
if(flag):
print(ans) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,573 | 375,574 | u777028980 | python |
p02658 | N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ans = 1
for i in range(N):
if Ai[0] == 0:
Ans = 0
break
Ans = Ans * Ai[i]
if Ans > 10 ** 18:
Ans = -1
break
if Ans <= 10**18:
print(Ans)
else:
print('-1') | N = int(input())
Ai = [0] * N
Ai = list(map(int,input().split()))
Ai.sort()
Ans = 1
for i in range(N):
if Ai[i] == 0:
Ans = 0
break
Ans = Ans * Ai[i]
if Ans > 10 ** 18:
Ans = -1
break
if Ans <= 10**18:
print(Ans)
else:
print('-1') | [
"call.add",
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 375,584 | 375,585 | u007931962 | python |
p02658 | def quick_sort(list):
stand=list[0]
over=[]
same=[]
under=[]
for i in list:
if(i>stand):
over.append(i)
elif(i<stand):
under.append(i)
else:
same.append(i)
if(len(over)>1):
over=quick_sort(over)
else:
pass
if(len... | def quick_sort(list):
stand=list[0]
over=[]
same=[]
under=[]
for i in list:
if(i>stand):
over.append(i)
elif(i<stand):
under.append(i)
else:
same.append(i)
if(len(over)>1):
over=quick_sort(over)
else:
pass
if(len... | [
"call.remove"
] | 375,586 | 375,587 | u918817732 | python |
p02658 | #from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#from bisect import bisect_right #二分探索用のモジュール bisect_right(a_list,value)
#import sys
#sys.setrecursionlimit(N) #N回まで再起を許可する。
# = int(input())
# =... | #from pprint import pprint
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from copy import deepcopy
#from itertools
#from bisect import bisect_right #二分探索用のモジュール bisect_right(a_list,value)
#import sys
#sys.setrecursionlimit(N) #N回まで再起を許可する。
# = int(input())
# =... | [
"assignment.value.change",
"identifier.change",
"call.function.change"
] | 375,588 | 375,589 | u240096083 | python |
p02658 | N = int(input())
As = map(int,input().split())
sum = 1
if any(a == 0 for a in As):
sum = 0
else:
for a in As:
sum*=a
if sum > 1000000000000000000:
sum = -1
break
print(sum)
#A,B=map(int,input().split())
#print(A*B)
| N = int(input())
As = list(map(int,input().split()))
sum = 1
if any(b == 0 for b in As):
sum = 0
else:
for a in As:
sum*=a
if sum > 1000000000000000000:
sum = -1
break
print(sum)
#A,B=map(int,input().split())
#print(A*B)
| [
"call.add",
"call.arguments.change",
"identifier.change",
"control_flow.branch.if.condition.change"
] | 375,599 | 375,600 | u577415482 | python |
p02658 | #! /usr/bin/env python3
# -*- coding:utf-8 -*-
def product_many(N):
if 0 in N: return 0
ans = 1
for x in N:
if (10 ^ 18 / ans) < x: return -1
ans *= x
if ans > 10 ^ 18: return -1
return ans
def main():
_ = input()
N = list(map(int, input().split()))
print(product_... | #! /usr/bin/env python3
# -*- coding:utf-8 -*-
def product_many(N):
if 0 in N: return 0
ans = 1
for x in N:
if (10 ** 18 / ans) < x: return -1
ans *= x
if ans > 10 ** 18: return -1
return ans
def main():
_ = input()
N = list(map(int, input().split()))
print(product_... | [
"control_flow.branch.if.condition.change"
] | 375,607 | 375,608 | u220875888 | python |
p02658 | from sys import stdin
N = int(stdin.readline().rstrip())
A = list(map(int, stdin.readline().rstrip().split()))
result = 1
if 0 in A:
print(0)
exit()
for i in A:
result = result * i
if result > 10**18:
result = -1
exit()
print(result) | from sys import stdin
N = int(stdin.readline().rstrip())
A = list(map(int, stdin.readline().rstrip().split()))
result = 1
if 0 in A:
print(0)
exit()
for i in A:
result = result * i
if result > 10**18:
print(-1)
exit()
print(result) | [
"call.arguments.change"
] | 375,609 | 375,610 | u869917163 | 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,615 | 375,616 | u623687794 | python |
p02658 | from math import log10
N = int(input())
A = list(map(int, input().split()))
s = 1
threshold = 10**18
if 0 in A:
print(0)
else:
for a in A:
s *= a
if s > threshold:
print(-1)
break
print(a)
else:
print(s)
| from math import log10
N = int(input())
A = list(map(int, input().split()))
s = 1
threshold = 10**18
if 0 in A:
print(0)
else:
for a in A:
s *= a
if s > threshold:
print(-1)
break
else:
print(s)
| [
"call.remove"
] | 375,617 | 375,618 | u663767599 | python |
p02658 | n = int(input())
*arr, = map(int, input().split())
res = 1
for i in range(n):
res *= arr[i]
if res > 10 ** 18:
break
print(res if res <= 10 ** 18 else - 1)
| n = int(input())
*arr, = map(int, input().split())
arr.sort()
res = 1
for i in range(n):
res *= arr[i]
if res > 10 ** 18:
break
print(res if res <= 10 ** 18 else - 1)
| [
"call.add"
] | 375,621 | 375,622 | u123525541 | python |
p02658 | import sys
def main():
n, *a = map(int, sys.stdin.read().split())
res = 1
for x in a:
res *= x
if res > 10**18:
print(-1)
return
print(res)
if __name__ == '__main__':
main() | import sys
def main():
n, *a = map(int, sys.stdin.read().split())
a.sort()
res = 1
for x in a:
res *= x
if res > 10**18:
print(-1)
return
print(res)
if __name__ == '__main__':
main() | [
"call.add"
] | 375,623 | 375,624 | u254871849 | python |
p02658 | n = int(input())
a = map(lambda x:int(x), input().split())
s = 1
ten18 = 10**18
over = False
for b in a:
if not over:
s *= b
if s > ten18:
#print(-1)
over = True
if b == 0:
over = False
break
if over:
print(-1)
else:
print(s)
| n = int(input())
a = map(lambda x:int(x), input().split())
s = 1
ten18 = 10**18
over = False
for b in a:
if not over:
s *= b
if s > ten18:
#print(-1)
over = True
if b == 0:
s = 0
over = False
break
if over:
print(-1)
else:
print(s)
| [
"assignment.add"
] | 375,625 | 375,626 | u263352518 | python |
p02658 | import sys
import math
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
K = int(input())
s = list(map(int, input().split()))
prod = 1
a = 10 ** 18
if 0 in s:
print(0)
sys.exit()
for k in range(K):
prod = prod * s[k]
if prod >= a:
print(-1)
sys.exit()
... | import sys
import math
sys.setrecursionlimit(10 ** 8)
input = sys.stdin.readline
def main():
K = int(input())
s = list(map(int, input().split()))
prod = 1
a = 10 ** 18
if 0 in s:
print(0)
sys.exit()
for k in range(K):
prod = prod * s[k]
if prod > a:
print(-1)
sys.exit()
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 375,627 | 375,628 | u591182368 | python |
p02658 | n=int(input())
k=list(map(int,input().split()))
res=1
for x in k:
res*=x
if(res>10**18):
print(-1)
break
else:
print(res) | n=int(input())
k=list(map(int,input().split()))
res=1
k.sort()
for x in k:
res*=x
if(res>10**18):
print(-1)
break
else:
print(res)
| [
"call.add"
] | 375,629 | 375,630 | u809043290 | 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:
ANS = -1
break
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 > 10**18:
ANS = -1
break
print(ANS) | [
"assignment.add"
] | 375,637 | 375,638 | u556657484 | python |
p02658 | n = int(input())
ans = 1
v = []
v = [int(x) for x in input().split()]
sorted(v)
for x in v:
ans = ans*x
if ans > 1e18:
break
if ans > 1e18:
print(-1)
else :
print(ans) | n = int(input())
ans = 1
v = []
v = [int(x) for x in input().split()]
v.sort()
for x in v:
ans = ans*x
if ans > 1e18:
break
if ans > 1e18:
print(-1)
else :
print(ans) | [
"call.remove",
"call.add"
] | 375,639 | 375,640 | u596451742 | python |
p02658 | n = int(input())
ans = 1
v = []
v = [int(x) for x in input().split()]
for x in v:
ans = ans*x
if ans > 1e18:
break
if ans > 1e18:
print(-1)
else :
print(ans) | n = int(input())
ans = 1
v = []
v = [int(x) for x in input().split()]
v.sort()
for x in v:
ans = ans*x
if ans > 1e18:
break
if ans > 1e18:
print(-1)
else :
print(ans) | [
"call.add"
] | 375,641 | 375,640 | u596451742 | python |
p02658 | # Nの入力
N = int(input())
A = list(map(int, input().split()))
result = 1
if 0 in A:
result = 0
else:
for i in A:
result *= i
if result > 10 ** 18:
result = -1
print(result)
| # Nの入力
N = int(input())
A = list(map(int, input().split()))
result = 1
if 0 in A:
result = 0
else:
for i in A:
result *= i
if result > 10 ** 18:
result = -1
break
print(result)
| [
"control_flow.break.add"
] | 375,644 | 375,645 | u618532828 | python |
p02658 | n=int(input())
a = [int(i) for i in input().split() if i!="1"]
if 0 in a:
print(0)
ans=1
for aa in a:
ans=ans*aa
if ans>10**18:
print(-1)
break
else:
print(ans) | n=int(input())
a = [int(i) for i in input().split() if i!="1"]
if 0 in a:
print(0)
else:
ans=1
for aa in a:
ans=ans*aa
if ans>10**18:
print(-1)
break
else:
print(ans) | [] | 375,646 | 375,647 | u586759271 | python |
p02658 | n=int(input())
a = [int(i) for i in input().split() if i!="1"]
if 0 in a:
print(0)
ans=1
for aa in a:
ans=ans*aa
if ans>10**18:
print(-1)
else:
print(ans) | n=int(input())
a = [int(i) for i in input().split() if i!="1"]
if 0 in a:
print(0)
else:
ans=1
for aa in a:
ans=ans*aa
if ans>10**18:
print(-1)
break
else:
print(ans) | [
"control_flow.break.add"
] | 375,648 | 375,647 | u586759271 | python |
p02658 | N = int(input())
A = map(int, input().split())
limit = 10**18+1
mul = 1
if 0 in A:
print("0")
else:
for i in A:
mul *= i
if mul >= limit:
print("-1")
break
if mul < limit:
print(mul)
| N = int(input())
A = list(map(int, input().split()))
limit = 10**18+1
mul = 1
if 0 in A:
print("0")
else:
for i in A:
mul *= i
if mul >= limit:
print("-1")
break
if mul < limit:
print(mul)
| [
"call.add",
"call.arguments.change"
] | 375,655 | 375,656 | u697559326 | python |
p02658 | def solve():
n=int(input())
a=list(map(int,input().split()))
ans=1
a.sort()
for i in a:
ans*=i
if(ans>=1000000000000000000):
print("-1")
return
print(ans)
solve() | def solve():
n=int(input())
a=list(map(int,input().split()))
ans=1
a.sort()
for i in a:
ans*=i
if(ans>1000000000000000000):
print(-1)
return
print(ans)
solve() | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 375,657 | 375,658 | u591322332 | python |
p02658 | if __name__ == '__main__':
a = int(input())
b = [int(i) for i in input().split()]
ans = 1
b.sort(reverse=True)
if 0 in b:
ans = 0
else:
for i in range(len(b)):
ans *= i
if ans > 10 ** 18:
ans = -1
break
print(ans)
| if __name__ == '__main__':
a = int(input())
b = [int(i) for i in input().split()]
ans = 1
b.sort(reverse=True)
if 0 in b:
ans = 0
else:
for i in range(len(b)):
ans *= b[i]
if ans > 10 ** 18:
ans = -1
break
print(ans) | [] | 375,659 | 375,660 | u290187182 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.