Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

try:
    for c in kita:
        seki = seki * int(c)
    if seki > 10**18:
        print("-1")
    else:
        print(seki)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

try:
    for c in kita:
        seki = seki * int(c)
    if seki > 10**18:
        print("-1")
    else:
        print(seki)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

try:
    for c in kita:
        seki = seki * int(c)
    if seki > 10**18:
        print("-1")
    else:
        print(seki)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

try:
    for c in kita:
        seki = seki * int(c)
    if seki > 10**18:
        print("-1")
    else:
        print(seki)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
a = []
seki = 1
for c in kita:
    a.append(c)

try:
    for c in a:
        seki = seki * int(c)
    if seki > 10**18:
        print("-1")
    else:
        print(seki)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)

Buggy python submission (verdict: Runtime Error):
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
a = []
int seki = 1
for c in kita:
    a.append(c)
try:
    for c in a:
        c = c * int(c)
    if c > 10**18:
        print("-1")
    else:
        print(c)
except:
    print("-1")

Fixed submission:
#!/usr/local/bin/python3
# coding: utf-8
n = input()
hairu = input()
kita = hairu.split(" ")
seki = 1

for c in kita:
    if c == "0":
        kita[0] = "0"

for c in kita:
    seki = seki * int(c)
    if seki > 10**18:
        break

if seki > 10**18:
    print("-1")
else:
    print(seki)