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

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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))


ans = T[0]
for t in T:
    ans = lcm(ans, t)

print(ans)


Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)

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

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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))


ans = T[0]
for t in T:
    ans = lcm(ans, t)

print(ans)

Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)

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

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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))


ans = T[0]
for t in T:
    ans = lcm(ans, t)

print(ans)

Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)

Buggy python submission (verdict: Runtime Error):
from math import gcd

N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

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

ans = T[0]
for t in T:
    ans = lcm(ans, t)

print(ans)


Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

from math import gcd
from functools import reduce


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


ans = T[0]
for t in T:
    ans = lcm(ans, t)

print(ans)


Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

from math import gcd
from functools import reduce


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

ans = reduce(lcm, T)
print(ans)

Fixed submission:
import math


def gcd(x, y):
    while (y):
        x, y = y, x % y
    return x


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


N = int(input())
T = []

for _ in range(N):
    T.append(int(input()))

ans = T[0]

for t in T:
    ans = lcm(ans, t)

print(ans)