Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return int(a*b//gcd(a,b))

def lcm_li(li):
    if len(li) == 2:
        return lcm(li[0], li[1])
    else:
        x = lcm(li[0], li[1])
        x = [x] + li[2:]
        return lcm_li(x)

print(lcm_li(T))

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i / gcd(lcm, i))

print(lcm)

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)

Buggy python submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return int(a*b/gcd(a,b))

def lcm_li(li):
    if len(li) == 2:
        return lcm(li[0], li[1])
    else:
        x = lcm(li[0], li[1])
        x = [x] + li[2:]
        return lcm_li(x)

print(lcm_li(T))

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return int(a*b/gcd(a,b))

def lcm_li(li):
    if len(li) == 2:
        return lcm(li[0], li[1])
    else:
        x = lcm(li[0], li[1])
        x = [x] + li[2:]
        return lcm_li(x)

print(lcm_li(T))

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)

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

def lcm(a, b):
    return int(a*b/math.gcd(a,b))

def lcm_li(li):
    if len(li) == 2:
        return lcm(li[0], li[1])
    else:
        x = lcm(li[0], li[1])
        x = [x] + li[2:]
        return lcm_li(x)

print(lcm_li(T))

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

lcm = 1
for i in T:
    lcm = int(lcm * i // gcd(lcm, i))

print(lcm)