Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,k = input().split()
hate_num = input().split()
num = int(n)
boo = False
while(boo == False):
  dec = []
  for i in str(num):
    dec.append(i not in hate_num)
    
  if(False not in dec):
    boo = True
  num += 1
    
print(num-1)

Fixed submission:
input_num = input().split()
numbers = {'5':0,'7':0}
for num in input_num:
  if(num=='5' or num=='7'):
    numbers[num] +=1

if(numbers['5']==2 and numbers['7']==1):
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
H = list(map(int, input().split()))
road = [0 for i in range(m)]

for i in range(m):
    road[i] = list(map(int, input().split()))

ans = 0
for i in range(n):
    flag = 0
    for j in range(m):
        if road[j][0] - 1 == i:
            if H[i] <= H[road[j][1]-1]:
                flag = 1
                break
        if road[j][1]  - 1 == i:
            if H[i] <= H[road[j][0]-1]:
                flag = 1
                break
    if flag == 0:
        ans = ans + 1

print(ans)

Fixed submission:
n, m = map(int, input().split())
H = list(map(int, input().split()))
road = [0 for i in range(m)]
ans = [0] * n

for i in range(m):
    road[i] = list(map(int, input().split()))

for j in range(m):
    if H[road[j][0]-1] < H[road[j][1]-1]:
        ans[road[j][0]-1] = 1
    elif H[road[j][0]-1] > H[road[j][1]-1]:
        ans[road[j][1]-1] = 1
    elif H[road[j][0]-1] == H[road[j][1]-1]:
        ans[road[j][0]-1] = 1
        ans[road[j][1]-1] = 1

total = sum(ans)
print(n-total)

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
H = list(map(int, input().split()))
road = [0 for i in range(m)]

for i in range(m):
    road[i] = list(map(int, input().split()))

ans = 0
for i in range(n):
    flag = 0
    for j in range(m):
        if road[j][0] - 1 == i:
            if H[i] <= H[road[j][1]-1]:
                flag = 1
        if road[j][1]  - 1 == i:
            if H[i] <= H[road[j][0]-1]:
                flag = 1
    if flag == 0:
        ans = ans + 1

print(ans)

Fixed submission:
n, m = map(int, input().split())
H = list(map(int, input().split()))
road = [0 for i in range(m)]
ans = [0] * n

for i in range(m):
    road[i] = list(map(int, input().split()))

for j in range(m):
    if H[road[j][0]-1] < H[road[j][1]-1]:
        ans[road[j][0]-1] = 1
    elif H[road[j][0]-1] > H[road[j][1]-1]:
        ans[road[j][1]-1] = 1
    elif H[road[j][0]-1] == H[road[j][1]-1]:
        ans[road[j][0]-1] = 1
        ans[road[j][1]-1] = 1

total = sum(ans)
print(n-total)
Buggy python submission (verdict: Runtime Error):
s=input()
s[0]='2'
s[1]='0'
s[2]='1'
s[3]='8'
print(s)

Fixed submission:
s=input()
r=s[4:]
print("2018%s"%(r))
Buggy python submission (verdict: Runtime Error):
print(48-int(input().split())

Fixed submission:
a=int(input())
print(48-a)

Buggy python submission (verdict: Runtime Error):
print(48-int(input())

Fixed submission:
a=int(input())
print(48-a)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0
for a in range(1, n+1):
    for b in range(1, n+1):
        if a*b < n:
            ans += 1
        else:
            break
print(ans)

Fixed submission:
n = int(input())
ans = 0
for a in range(1, n+1):
    ans += (n-1)//a
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
x = 0
for i in range(len(a)-1):
    f = 0
    for j in range(i+1, len(a)):
        f += a[j]
        f = f%(10**9+7)
    x += a[i]*f
    x = x%(10**9+7)
print(x%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = 0
m = sum(a)
for i in range(len(a)-1):
    m = (m-a[i])%(10**9+7)
    x += a[i]*m
    x = x%(10**9+7)
print(x%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
x = 0
for i in range(len(a)-1):
    for j in range(i+1, len(a)):
        x += ((a[i]%(10**9+7))*(a[j]%(10**9+7)))%(10**9+7)
        x = x%(10**9+7)
print(x%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = 0
m = sum(a)
for i in range(len(a)-1):
    m = (m-a[i])%(10**9+7)
    x += a[i]*m
    x = x%(10**9+7)
print(x%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
x = 0
for i in range(len(a)-1):
    for j in range(i+1, len(a)):
        x += (a[i]*a[j])%(10**9+7)
print(x%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = 0
m = sum(a)
for i in range(len(a)-1):
    m = (m-a[i])%(10**9+7)
    x += a[i]*m
    x = x%(10**9+7)
print(x%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
x = 0
for i in range(len(a)-1):
    for j in range(i+1, len(a)):
        x += a[i]*a[j]
print(x%(10**9+7))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = 0
m = sum(a)
for i in range(len(a)-1):
    m = (m-a[i])%(10**9+7)
    x += a[i]*m
    x = x%(10**9+7)
print(x%(10**9+7))
Buggy python submission (verdict: Runtime Error):
import math

n, d = map(int, input().split())
xy = [list(map(int, input().split())) for a in range(n)]
count = 0
for i in range(n):
    number = (xy[i][0]**2)+(xy[i][1]**2)
    result = math.sqrt(number)
    if result <= d:
        count += 1
    else:
        count += 0
print(count)

Fixed submission:
x = int(input())
if x >= 30:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
h, w, k = map(int, input().split())
c = []
for i in range(h):
    c.append(list(map(str, input().split())))
ans = 0
for j in range(1<<h):
    for k in range(1<<w):
        black = 0
        for m in range(h):
            for n in range(w):
                if ((j>>m) & 1) == 0 and ((k>>n) & 1) == 0 and c[m][n] == "#":
                    black += 1
        if black == k:
            ans += 1
print(ans)

Fixed submission:
h, w, k = map(int, input().split())
c = [list(input()) for i in range(h)]
ans = 0
for p in range(1<<h):
    for q in range(1<<w):
        black = 0
        for m in range(h):
            for n in range(w):
                if (p>>m)&1 == 0 and (q>>n)&1 == 0 and c[m][n] == "#":
                    black += 1
        if black == k:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
x = 1
if 0 in a:
    x = 0
else:
    for j in a:
        x = j*x
        if x > 10**18:
            x = -1
            break
print(x)

Fixed submission:
A, B = map(int, input().split())
print(A*B)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
x = 1
if 0 in a:
    x = 0
for j in a:
    x = j*x
    if x > 10**18:
        x = -1
        break
print(x)

Fixed submission:
A, B = map(int, input().split())
print(A*B)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
x = 1
for j in a:
    x = j*x
if x > 10**18:
    print(-1)
else:
    print(x)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = 1
if 0 in a:
    x = 0
    print(x)
else:
    for j in a:
        x = j*x
        if x > 10**18:
            x = -1
            break
        else:
            continue
    print(x)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
for i in range(1, n+1):
    if i in a:
        print(a.count(i))
    else:
        print(0)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = [0]*n
for i in a:
    x[i-1] += 1
for j in x:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
for i in range(1, n+1):
    print(a.count(i))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
x = [0]*n
for i in a:
    x[i-1] += 1
for j in x:
    print(j)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
ans = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            ans += gcd(i, j, k)
print(ans)

Fixed submission:
import math

k = int(input())
ans = 0
for i in range(1, k+1):
    for j in range(1, k+1):
        num = math.gcd(i, j)
        for k in range(1, k+1):
            ans += math.gcd(num, k)
print(ans)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(int, input().split()))
num = sum(a)
cnt = 0
for i in range(n):
    if a[i] < num/(4*m):
        continue
    else:
        cnt += 1
if cnt >= m:
    print("Yes")
else:
    print("No")   

Fixed submission:
n, k = map(int, input().split())
print(min(n%k, k-n%k))
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for _ in range(n)]
t = s.sort()
x = 0
maxx = 0
for i in range(n-1):
    if s[i] == s[i+1]:
        x += 1
        if x == maxx:
            maxx = x
            t.append(s[i])
        elif x > maxx:
            maxx = x
            t = [s[i]]
    else:
        x = 0
for j in t:
    print(j)

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
ss = sorted(s)
t = ss
x = 0
maxx = 0
for i in range(n-1):
    if ss[i] == ss[i+1]:
        x += 1
        if x == maxx:
            maxx = x
            t.append(ss[i])
        elif x > maxx:
            maxx = x
            t = [ss[i]]
    else:
        x = 0
for j in t:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]
lists = sorted(list(set(s)))
num = list()
for i in lists:
    cnt = 0
    for j in s:
        if i == j:
            cnt += 1
    num.append(cnt)
maxnum = max(num)
for j in range(len(lists)):
    if num[j] == maxnum:
        print(lists[j])

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
ss = sorted(s)
t = ss
x = 0
maxx = 0
for i in range(n-1):
    if ss[i] == ss[i+1]:
        x += 1
        if x == maxx:
            maxx = x
            t.append(ss[i])
        elif x > maxx:
            maxx = x
            t = [ss[i]]
    else:
        x = 0
for j in t:
    print(j)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for _ in range(n)]
lists = sorted(list(set(s)))
num = list()
for i in lists:
    num.append(s.count(i))
maxnum = max(num)
for j in range(len(lists)):
    if num[j] == maxnum:
        print(lists[j])

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
ss = sorted(s)
t = ss
x = 0
maxx = 0
for i in range(n-1):
    if ss[i] == ss[i+1]:
        x += 1
        if x == maxx:
            maxx = x
            t.append(ss[i])
        elif x > maxx:
            maxx = x
            t = [ss[i]]
    else:
        x = 0
for j in t:
    print(j)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))
ans = 0
for i in range(n):
    cnt = 0
    for j in range(i):
        if p[i] <= p[j]:
            cnt += 1
            if cnt == i:
                ans += 1
print(ans + 1)

Fixed submission:
n = int(input())
p = list(map(int, input().split()))
minp = 2*10**5
ans = 0
for i in range(n):
    if minp >= p[i]:
        minp = p[i]
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
def f():
    for i in range(1, 10):
        for j in range(1, 10):
            if i*j == n:
                return "Yes"
    return "No"
print(f())

Fixed submission:
a, b = map(int, input().split())
if a <= 9 and b <= 9:
    print(a*b)
else:
    print(-1)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if n%2 == 0:
    cnt = 0
    for i in range(n//2):
        if s[i] == s[i + n//2]:
            cnt += 1
            if cnt == n//2:
                print("Yes")
                break
        else:
            print("No")  
            break
else:
    print("No")

Fixed submission:
n = int(input())
def f():
    for i in range(1, 10):
        for j in range(1, 10):
            if i*j == n:
                return "Yes"
    return "No"
print(f())
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = []
for i in range(1, n+1):
    for j in range(n):
        if a[j] == i:
            ans.append(str(j+1))
print(" ".join(ans))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
l = []
for i in range(n):
    l.append([a[i], i+1])
l = sorted(l)
ans = []
for j in range(n):
    ans.append(str(l[j][1]))
print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
s = input()
x = list()
cnt = 0
for i in range(len(s)):
    if s[i] == "A" or s[i] == "T" or s[i] == "G" or s[i] == "C":
        cnt += 1
    else:
        x.append(cnt)
        cnt = 0
print(max(x))

Fixed submission:
s = input()
x = list()
cnt = 0
for i in range(len(s)):
    if s[i] == "A" or s[i] == "T" or s[i] == "G" or s[i] == "C":
        cnt += 1
        if i == len(s) - 1:
            x.append(cnt)
    else:
        x.append(cnt)
        cnt = 0
print(max(x))
Buggy python submission (verdict: Runtime Error):
n = int(input)
if n%2 == 0:
  print(n)
else:
  print(n*2)

Fixed submission:
n = int(input())
if n%2 == 0:
  print(n)
else:
  print(n*2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
blue = list()
for i in range(n):
    blue.append(input())
m = int(input())
red = list()
for j in range(m):
    red.append(input())
ans = 0
for p in range(n):
    cnt = 0
    for q in range(n):
        if blue[p] == blue[q]:
            cnt += 1
    for r in range(m):
        if blue[p] == red[r]:
            cnt -= 1
    ans = max(ans, cnt)
print(ans)

Fixed submission:
a, b, c = map(int, input().split())
if a+b < c:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    if x > s:
        break
    else:
        for y in range(k+1):
            if x+y > s:
                break
            else:
                for z in range(k+1):
                    if x+y+z == s:
                        ans += 1
                    elif x+y+z > s:
                        break
print(ans)

Fixed submission:
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    if x > s:
        break
    else:
        for y in range(k+1):
            if x+y > s:
                break
            elif s - x - y <= k:
                ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z == s:
                ans += 1
print(ans)

Fixed submission:
k, s = map(int, input().split())
ans = 0
for x in range(k+1):
    if x > s:
        break
    else:
        for y in range(k+1):
            if x+y > s:
                break
            elif s - x - y <= k:
                ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import stdin


stdin = io.StringIO(__INPUT)

D,T,S = [ int(x) for x in stdin.readline().rstrip().split()]

if ( S * T) > D:
    print('Yes')
else:
    print('No')

Fixed submission:
from sys import stdin


D,T,S = [ int(x) for x in stdin.readline().rstrip().split()]

if ( S * T) >= D:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import sys
import math


test = int(stdin.readline().rstrip())

result = math.ceil( test[0] / test[1] ) * test[2]

print(result)

Fixed submission:

from sys import stdin
from math import ceil

N,X,T = [int(x) for x in stdin.readline().rstrip().split()]

result = ceil( N / X ) * T

print(result)

Buggy python submission (verdict: Runtime Error):
import sys
import math


test = sys.stdin

result = math.ceil( test[0] / test[1] ) * test[2]

print(result)

Fixed submission:

from sys import stdin
from math import ceil

N,X,T = [int(x) for x in stdin.readline().rstrip().split()]

result = ceil( N / X ) * T

print(result)
Buggy python submission (verdict: Runtime Error):
from sys import stdin

test = list(stdin.readline().lstrip().rstrip())

count = [0,0]
i=0
before = 'R'

for str in test:
    if str=='R':
        count[i] += 1
    else:
        i = i + 1

print(max(count))

Fixed submission:
from sys import stdin


test = list(stdin.readline().rstrip())

count = [0,0,0]
i=0
before = 'R'

for str in test:
    if str=='R':
        count[i] += 1
    else:
        i = i + 1

print(max(count))
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
c=input().split()
ct=0
for i in c:
  if i>=b: ct+=1
print(ct)

Fixed submission:
a=int(input())
if a%2==0:
  print(1/2)
else:
  print((a//2+1)/a)
Buggy python submission (verdict: Runtime Error):
print(int(input)**3)

Fixed submission:
a=int(input())
print(a*a*a)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d=map(int,input().split())


maxx=a*c
for x in range(a,b+1):
    for y in range(c,d+1):
        z=x*y
        if z>maxx :
            maxx=z


print(maxx)


Fixed submission:
a,b,c,d=map(int,input().split())



x1=a*d
x2=a*c
x3=b*c
x4=b*d

print(max(x1,x2,x3,x4))
Buggy python submission (verdict: Runtime Error):
i = int(input())
if i = 0:
  print(1)
elif i = 1:
  print(0)
  
else:
  pass

Fixed submission:
x = int(input())
if x==0:
    print(1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
n, m = list(map(int, input()))
if n*n == m*n:
  print('Yes')
else:
  print('No')

Fixed submission:
n, m = list(map(int, input().split()))
if n*n == m*n:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
#print("Hello World!")
A,B,C=map(int,raw_input().split() )
#print("end")
if A+B>=C:
    print("Yes\n")
else:
    print("No\n")


Fixed submission:
A,B,C=map(int,input().split() )
if A+B>=C:
    print("Yes\n")
else:
    print("No\n")
Buggy python submission (verdict: Runtime Error):
x = input()
if x >= 30:
    print("Yes")
else:
    print("No")

Fixed submission:
x = int(input())
if x >= 30:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
    # 1秒あたり距離はv-wだけ縮まる
    # t秒の時の距離は(v-w)*t
    # それが|a-b| の距離に間に合うor追い越せるかどうか
    if abs(a - b) <= (v - w) * t
    # if t <= abs(a - b):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
    # 1秒あたり距離はv-wだけ縮まる
    # t秒の時の距離は(v-w)*t
    # それが|a-b| の距離に間に合うor追い越せるかどうか
    if abs(a - b) <= (v - w) * t:
    # if t <= abs(a - b):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
import math
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

a = abs(a)
b = abs(b)

if a > b:
    w = a
    a = b
    b = a

# 鬼と逃げる人がぶつかる場所
meetingplace = int(lcm(a, b) + lcm(v, w))

requiredtime = int((meetingplace - v) / a) // v

if v > w:
    if t >= requiredtime:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
    # 1秒あたり距離はv-wだけ縮まる
    # t秒の時の距離は(v-w)*t
    # それが|a-b| の距離に間に合うor追い越せるかどうか
    if abs(a - b) <= (v - w) * t:
    # if t <= abs(a - b):
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
import math
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if abs(a) > abs(b):
    mostabs = abs(a)
else:
    mostabs = abs(b)

if a < 0 or b < 0:
    a += mostabs
    b += mostabs


# 鬼と逃げる人がぶつかる場所
meetingplace = int(lcm(a, b) + lcm(v, w))

requiredtime = int((meetingplace - v) / a)

if v > w:
    if t >= requiredtime:
        print("YES")
    else:
        print("NO")
else:
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if v > w:
    # 1秒あたり距離はv-wだけ縮まる
    # t秒の時の距離は(v-w)*t
    # それが|a-b| の距離に間に合うor追い越せるかどうか
    if abs(a - b) <= (v - w) * t:
    # if t <= abs(a - b):
        print("YES")
    else:
        print("NO")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18
ans = 1
if 0 in a_lst:
    # print("a")
    ans = 0
else:
    for i in range(n):
        ans *= a_lst[i]
    
if ans > x:
    print(-1)
else:
    print(ans)

Fixed submission:
# import numpy as np
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18

# ans = np.prod(a_lst)



ans = 1
if 0 in a_lst:
    # print("a")
    ans = 0
else:
    for i in range(n):
        ans *= a_lst[i]
        if ans > x:
            ans = -1
            break
        # elif ans == 0:
        #     break
    
# if ans > x:
#     print(-1)
# else:
#     print(ans)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18
ans = 1
for i in range(n):
    ans *= a_lst[i]

if ans > x:
    print(-1)
else:
    print(ans)

Fixed submission:
# import numpy as np
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18

# ans = np.prod(a_lst)



ans = 1
if 0 in a_lst:
    # print("a")
    ans = 0
else:
    for i in range(n):
        ans *= a_lst[i]
        if ans > x:
            ans = -1
            break
        # elif ans == 0:
        #     break
    
# if ans > x:
#     print(-1)
# else:
#     print(ans)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18
ans = 1
for i in range(n):
    ans *= a_lst[i]

if ans > x:
    print(-1)
else:
    print(ans)

Fixed submission:
# import numpy as np
n = int(input())
a_lst = list(map(int, input().split()))
x = 10 ** 18

# ans = np.prod(a_lst)



ans = 1
if 0 in a_lst:
    # print("a")
    ans = 0
else:
    for i in range(n):
        ans *= a_lst[i]
        if ans > x:
            ans = -1
            break
        # elif ans == 0:
        #     break
    
# if ans > x:
#     print(-1)
# else:
#     print(ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s) // 2
lst = [(i + j) for (i, j) in zip(s[::2], s[1::2])]

for i in range(n):
    if lst[i] == 'hi':
        check = 1
    else:
        check = 0
        break

if check == 1:
    print("Yes")
else:
    print("No")


Fixed submission:
s = input()
n = len(s) // 2
lst = [(i + j) for (i, j) in zip(s[::2], s[1::2])]

check = 0
for i in range(n):
    if lst[i] == 'hi':
        check = 1
    else:
        check = 0
        break

if len(s) % 2 == 1:
    check = 0

if check == 1:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
a, b = map(int, input().split())

print(lcm(a, b))

Fixed submission:
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
a, b = map(int, input().split())

print(lcm(a, b))