Problem:
 Score : 300 points    Problem Statement We have N clocks. The hand of the i -th clock (1≤i≤N) rotates through 360° in exactly T_i seconds. Initially, the hand of every clock stands still, pointing directly upward. Now, Dolphin starts all the clocks simultaneously. In how many seconds will the hand of every clock point directly upward again?      Constraints  1≤N≤100   1≤T_i≤10^{18}   All input values are integers.  The correct answer is at most 10^{18} seconds.         Input Input is given from Standard Input in the following format:  N  T_1  :  T_N       Output Print the number of seconds after which the hand of every clock point directly upward again.        Sample Input 1 2
2
3      Sample Output 1 6  We have two clocks. The time when the hand of each clock points upward is as follows:   Clock 1 : 2 , 4 , 6 , ... seconds after the beginning  Clock 2 : 3 , 6 , 9 , ... seconds after the beginning   Therefore, it takes 6 seconds until the hands of both clocks point directly upward.       Sample Input 2 5
2
5
10
1000000000000000000
1000000000000000000      Sample Output 2 1000000000000000000

Solution (Python):
n = int(input())
re = 1

def calc(re, t):
    if t == 0:
        return re
    else:
        return calc(t, re%t)

for _ in range(n):
    t = int(input())
    re = re*t//calc(re, t)
    
print(re)

Solution (Python):
from functools import reduce
N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))


def lcm(a, b):
    mul = a*b
    if a < b:
        a, b = b, a
    while b:
        r = a % b
        a = b
        b = r
    return mul//a


print(reduce(lcm, T))

Solution (Python):
from fractions import gcd
from functools import reduce

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
def lcm_base(x, y):
    return(x*y)//gcd(x,y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm(T))

Solution (Python):
N = int(input())


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


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


ans = 1
for _ in range(N):
    ans = lcm(ans, int(input()))
print(ans)

Solution (Python):
n = int(input())
T = [int(input()) for _ in range(n)]

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

def lcm(a,b):
    return a*b//gdc(a,b)

temp = T[0]
for i in range(n-1):
    temp = lcm(temp,T[i+1])
print(temp)

Solution (Python):
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

def lcm(a, b):
    return a * b // gcd(a, b)
 
a, b = 1, 1
n = int(input())
for i in range(n):
    a = lcm(a, int(input()))
print(a)

Solution (Python):
def get_gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

def get_lcm(a, b, gcd=0):
    if gcd == 0:
        return a * b // get_gcd(a, b)
    else:
        return a * b // gcd


N = int(input())

T = []

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

R = T[0]

for n in range(1, N):
    R = get_lcm(R, T[n])

print(R)

Solution (Python):

import math

def getInt(): return int(input())
def getIntFromRows(n): return [int(input()) for i in range(n)]
def gcd(x, y):
    m = max(x,y)
    n = min(x,y)
    while m%n != 0:
        w = m%n
        m = n
        n = w
    return n
def lcm(x, y): return x*y//gcd(x,y)

N = getInt()
T = getIntFromRows(N)
lc = T[0]
for i in range(1, N):
    lc = lcm(lc,T[i])
print(lc)

Solution (Python):
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)

Solution (Python):
from fractions import gcd
def lcm(a,b): return a*b//gcd(a,b)
N=int(input())
T=[int(input()) for i in range(N)]
ans=1
for t in T:
    ans=lcm(ans,t)
print(ans)

Solution (Python):
from fractions import gcd
def lcm(a,b): return a*b//gcd(a,b)
N=int(input())
ans=1
for i in range(N):
    t=int(input())
    ans=lcm(ans,t)
print(ans)

Solution (Python):
from fractions import gcd

from functools import reduce

def lcm_base(a, b):
    return (a * b) // gcd(a, b)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
times = [int(input()) for i in range(n)]

print(lcm(times))

Solution (Python):
def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)
        
def lcm(a,b):
    return a//gcd(a,b)*b
    
n = int(input())
ans=1
for i in range(n):
    t = int(input())
    ans = lcm(ans,t)
    
print(ans)

Solution (Python):
def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)
        
def lcm(a,b):
    return b * a//gcd(a,b)
    
n = int(input())
ans=1
for i in range(n):
    t = int(input())
    ans = lcm(ans,t)
    
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(10000)
def gcd(n1,n2):
    if n1 > n2:
        n1,n2 = n2,n1
    if n2 % n1 == 0:return n1
    else: return gcd(n2%n1,n1)
n = int(input())
if n == 1:
    print(int(input()))
    sys.exit()
t = [int(input()) for i in range(n)]
check = t[0]*t[1]//gcd(t[0],t[1])
for i in range(n-2):
    check = (check*t[i+2])//gcd(check,t[i+2])
print(int(check))

Solution (Python):
import fractions
n= int(input())
ans = 1
for i in range(n):
 tmp = int(input())
 ans =  (ans*tmp)//fractions.gcd(ans,tmp)
  
print(ans)

Solution (Python):
def gcd(x,y):
    a=max(x,y)
    b=min(x,y)
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)

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

N=int(input())
ans=1
for i in range(N):
    ans=lcm(ans,int(input()))
print(ans)

Solution (Python):
n = int(raw_input())

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

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

x = 1
for i in range(n):
    ti = int(raw_input())
    x = lcm(x, ti)

print x

Solution (Python):
def gcd(a, b):
    sm = min(a, b)
    la = max(a, b)
    if la % sm == 0:
        return sm
    else:
        return gcd(sm, la % sm)


N = int(input())
A = [int(input()) for _ in range(N)]

ans = 1
for a in A:
    ans = a * ans // gcd(a, ans)
print(ans)

Solution (Python):
def gcm(a,b):
  while b:
    a,b=b,a%b
  return a
def lcm(c,d):
  return c*d//gcm(c,d)
N=int(input())
j=int(input())
for i in range(N-1):
  k=int(input())
  j=lcm(j,k)
print(j)

Solution (Python):
N = int(input())
ans = 1

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

for i in range(N):
    t = int(input())
    tmp = gcd(ans, t)
    ans = ans * t // tmp
print(ans)

Solution (Python):
n=int(input())
a=[]
for i in range(n):
    a.append(int(input()))


def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)


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

ans=a[0]
for i in a:
    ans=lcm(ans,i)
    
print(ans)

Solution (Python):
from fractions import gcd
from functools import reduce
n = int(input())
t = []


for _ in range(n):
    t.append(int(input()))


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


def lcm_list(*numbers):
    return reduce(lcm, numbers)


print(lcm_list(*t))

Solution (Python):
N = int(input())
T = [int(input()) for i in range(N)]


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


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


if N == 1:
    print(T[0])
    exit()

now = lcm(T[0], T[1])
for i in range(1, N):
    now = lcm(now, T[i])

print(now)

Solution (Python):

def gcd(a,b):
    if a==b:
        return b
    elif a%b == 0:
        return b
    else:
        return gcd(b,a%b)
def lcd(a,b):
    gc = gcd(a,b)
    return (a*b)//gc
N = int(input())
t = []
num = 1
lc = 1
for i in range(N):
    tmp = int(input())
    if tmp not in t:
        t.append(tmp)
t.sort()
for i in range(len(t)):
    tmp = lc
    lc = lcd(t[i],tmp)
print(lc)

Solution (Python):
def abc070_c():
    from fractions import gcd
    n = int(input())
    t = [int(input()) for _ in range(n)]
    ans = t[0]
    for v in t:
        ans = ans * v // gcd(ans, v)

    print(ans)


abc070_c()

Solution (Python):
def kouyaku(a,b):
    aa = max(a,b)
    bb = min(a,b)
    if bb == 0:
        return aa
    else:
        return kouyaku(bb,aa%bb)

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

T.sort()

ans = T[0]
for time in T:
    kou = kouyaku(ans, time)
    if kou != time:
        ans = ans//kou * time
    
print(ans)

Solution (Python):
N = int(input())

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

result = []
x = 1
for i in range(N):
  T = int(input())
  x = x * T // gcd(x, T)
  result.append(x)
print(max(result))

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

ans = 1
for _ in range(int(input())):
    t = int(input())
    ans = ans * t // gcd(ans, t)
print(ans)

Solution (Python):
from fractions import gcd
from functools import reduce
def lcm(x, y): return x * y // gcd(x, y)
N, *T = map(int, open(0).read().split())
print(reduce(lcm, T))

Solution (Python):
from fractions import gcd
a=int(input())
s=int(input())
k=s
for i in range(a-1):
    d=int(input())
    k=(k*d)//gcd(k,d)
print(k)

Solution (Python):
from functools import reduce

n = int(input())

t = [int(input()) for _ in range(n)]

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

t.sort()

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

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(t))

Solution (Python):
from functools import reduce
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    return gcd(b, a%b)

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

N = int(input())
T = [int(input()) for _ in range(N)]

print(reduce(lcm, T))

Solution (Python):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
n = int(input())
t=[]
for i in range(n):
    t.append(int(input()))
print(lcm(*t))

Solution (Python):
n = int(input())
t_list = [int(input()) for _ in range(n)]


def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


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


r = 1
for i in range(n):
    r = lcm(r, t_list[i])
print(r)

Solution (Python):
N = int(input())
T = [int(input()) for i in range(N)]

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

T.sort()
time = T[0]
for i in range(1,N):
    time *= T[i] // gcd(T[i], time)
print(time)

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


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


def main():
    n = int(input())
    ts = [int(input()) for _ in range(n)]
    res = ts[0]
    for t in ts[1:]:
        res = lcm(res, t)
    print(res)


if __name__ == '__main__':
    main()

Solution (Python):
from fractions import gcd
N = int(input())

ans = int(input())
for _ in range(N-1):
    t = int(input())
    g = gcd(t, ans)
    ans = ans*t//g
print(ans)

Solution (Python):
def gcd(a, b):
    while b > 0:
        tmp = a
        a = b
        b = tmp % b
    return a


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


n = int(input())
t = [0 for i in range(n)]
for i in range(n):
    t[i] = int(input())
t = sorted(t)
_sum = t[0]
for i in range(1, n):
    
    _sum = lcm(_sum, t[i])
    
print(_sum)

Solution (Python):
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a
 
N = int(input())
A = [int(input()) for i in range(N)]
 
ans = A[0]
 
for i in A:
    ans = (ans*i)//gcd(ans, i)
print(ans)

Solution (Python):
import fractions as fr
n = int(input())
t = [int(input()) for _ in range(n)]
ans = 1
for i in range(n):
	ans = ans // fr.gcd(ans, t[i]) * t[i]
print(ans)

Solution (Python):
import fractions
def lcm(a,b):
  return (a*b)//fractions.gcd(a,b)
n=int(input())
if n>1:
  x=lcm(int(input()),int(input()))
  for i in range(n-2):
    x=lcm(x,int(input()))
  print(x)
else:print(int(input()))

Solution (Python):

from functools import reduce

n = int(input())
a = [int(input()) for _ in range(n)]

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

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

def lcm(nums):
    
    return reduce(lcm_base, nums, 1)

print(lcm(a))

Solution (Python):
from functools import reduce
from fractions import gcd
N = int(input())
T = [int(input()) for i in range(N)]
def lcm(x,y):
    return (x * y) // gcd(x,y)
ans = reduce(lcm,T)
print(ans)

Solution (Python):
import fractions
N=int(input())
LCM=int(input())
for i in range(N-1):
    T=int(input())
    LCM=LCM*T//fractions.gcd(LCM,T)
print(LCM)

Solution (Python):
N=int(input())
l=[]
for i in range(N):
    l.append(int(input()))
import fractions
from functools import reduce
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
print(lcm_list(l))

Solution (Python):
import itertools
import math


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


def lcm(left, right):
    return (left * right) // gcd(left, right)


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

res = 0
if len(Ts) == 0:
    res = 0
elif len(Ts) == 1:
    res = Ts[0]
else:
    res = int(lcm(Ts[0], Ts[1]))
    for T in Ts[2:]:
        res = int(lcm(res, T))

print(str(int(res)))

Solution (Python):
def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

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

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

ans = T[0]

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

print(ans)

Solution (Python):
def gcd(a, b):
    if a < b:
        a, b = b, a
    while b > 0:
        a, b = b, a % b
    return a

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

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

ans = T[0]

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

print(ans)

Solution (Python):

n = int(input())

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

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

res = int(input())
for _ in range(n-1):
    t = int(input())
    res = lcm(res,t)

print(res)

Solution (Python):
N = int(input())
ans = int(input())


def gcd(x, y):
    x, y = max(x, y), min(x, y)
    if x % y == 0:
        return y
    else:
        return gcd(y, x % y)


for i in range(N-1):
    x = int(input())
    g = gcd(ans, x)
    ans *= x
    ans //= g
print(ans)

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


num_clock = int(input())
times = [int(input()) for i in range(num_clock)]
spent_time = times[0]
for time in times[1:]:
    spent_time = (spent_time * time) // gcd(spent_time, time)
print(spent_time)

Solution (Python):
def euclidean(a,b):
    if b == 0:
        return a
    else:
        return euclidean(b,a%b)

if __name__ == '__main__':
    n = int(input())
    num_list = [int(input()) for _ in range(n)]
    a = num_list[0]

    for idx in range(1,len(num_list)):
        b = euclidean(a,num_list[idx])
        a = a*num_list[idx]//b
    print(a)

Solution (Python):
def gcd(a,b):
    a,b=min(a,b),max(a,b)
    if a==0:
        return b
    else:
        return gcd(b%a,a)

n=int(input())
l=[int(input()) for i in range(n)]
a=l[0]
for i in range(1,n):
    b=gcd(a,l[i])
    a=a*l[i]//b
print(a)

Solution (Python):
from functools import reduce

n = int(input())
d = []
for i in range(n):
    d.append(input())

t = [int(m) for m in d]

def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)










print(lcm_list(t))

Solution (Python):
def gcd(a, b):
    while b != 0:
        a, b = b, a%b
    return a

N = int(input())
A = [int(input()) for i in range(N)]

ans = A[0]

for i in A:
    ans = (ans*i)//gcd(ans, i)
print(ans)

Solution (Python):
import math

n = int(input())

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    c = a % b
    return gcd(b, c)
    
def lcm(x,y):
	return (x * y) // gcd(x, y)

ct = 1
for _ in range(n):
	t = int(input())
	ct = lcm(ct,t)
	
print(ct)

Solution (Python):

def gcd(m, n):
    while(n != 0):
        temp = n
        n = m % n
        m = temp
    return m


N = int(input())
T = [int(input()) for _ in range(N)]
ans = 0
for i in range(len(T)):
    if ans == 0:
        ans = T[i]
    else:
        ans = ans // gcd(ans, T[i]) * T[i]
print(ans)

Solution (Python):
def gcd(a,b):
  if a<b:
    a,b=b,a
  while b>0:
    a,b=b,a%b
  return int(a)
N=int(input())
T=1
for i in range(N):
  ti=int(input())
  T=T*ti//gcd(T,ti)
print(T)

Solution (Python):
def gcd(x, y):
	if x < y:
		x, y = y, x
	if y == 0:
		return x
	z = x % y
	return gcd(y, z) 
	
N=int(input())
prenum = 1
for i in range(N):
	T = int(input())
	lcm = prenum // gcd(prenum, T) * T
	prenum = lcm
print(lcm)

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

T.sort()


def gcd(a, b):
    while (b != 0):
        tmp = a
        a = b
        b = tmp % b

    return a


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


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

print(ans)

Solution (Python):
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a
N = int(input())
ans = 1
for i in range(0,N):
    t = int(input())
    ans = t * ans // gcd(ans, t)
print(ans)

Solution (Python):
from functools import reduce

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

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

def lcmm(*args):
    return reduce(lcm, args)

N = int(input())
T = [0] * N
syuki = 0
for i in range(N):
    T[i] = int(input())
syuki = lcmm(*T)
print(syuki)

Solution (Python):
import sys
fin = sys.stdin.readline


def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


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


N = int(fin())
T_list = [int(fin()) for _ in range(N)]

if N == 1:
    print(T_list[0])
else:
    common_lcm = lcm(T_list[0], T_list[1])
    for T in T_list[1:]:
        common_lcm = lcm(common_lcm, T)
    print(common_lcm)

Solution (Python):
n = int(input())
t = [int(input()) for _ in range(n)]

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z

def lcm(m, n):
    return m * n//gcd(m, n)


while n > 1:
    i = 0
    next = []
    if n % 2 == 1:
        next.append(t[n-1])
        n -= 1
    while i < n:
        next.append(lcm(t[i], t[i + 1]))
        i += 2
    t = [] + next
    n = len(t)

print(t[0])

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

N = int(input())
ans = 1

for i in range(0,N):
    t = int(input())
    ans = t * ans // gcd(ans, t)

print(ans)

Solution (Python):
N = int(input())
T = [int(input()) for i in range(N)]


def gcd(a,b) :
    a,b = min(a,b),max(a,b)
    while b > 0 :
        a,b = b, a%b
    return a

def lcm(a,b) :
    return a*b//gcd(a,b)
if N == 1 :
    ans = T[0]
else :
    for i in range(len(T)) :
        if i == 0 :
            ans = lcm(T[i],T[i+1])
        else :
            ans = lcm(T[i],ans)
print(ans)

Solution (Python):
def euclid(A,B):

    big = max(A,B)
    small = min(A,B)

    r = big % small
    while r != 0:
        big = small
        small = r
        r = big % small
    
    return small


def LCM(A,B):
    return A*B//euclid(A,B)
    

N = int(input())

time = 1
for i in range(N):
    T = int(input())
    time = LCM(time,T)

print(time)

Solution (Python):

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

T.sort()

def gcd(a, b):
    if a < b: return gcd(b, a)
    elif b == 0: return a
    else: return gcd(b, a % b)

a = T[0]
for Ti in T[1:]: a = a * Ti // gcd(Ti, a)

print(a)

Solution (Python):
def solve(N, As):
    n = 1

    def gcd(a, b):
        a, b = min(a, b), max(a, b)
        while a > 0:
            a, b = b % a, a
        return b

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

    for a in As:
        n = lcm(a, n)
    return n


if __name__ == "__main__":
    N = int(input())
    As = [int(input()) for _ in range(N)]
    print(solve(N, As))

Solution (Python):
def solve(N, As):
    n = 1

    def gcd(a, b):
        a, b = min(a, b), max(a, b)
        while a > 0:
            a, b = b % a, a
        return b

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

    for a in As:
        n = lcm(a, n)
    return n


if __name__ == "__main__":
    N = int(input())
    As = [int(input()) for _ in range(N)]
    print(solve(N, As))

Solution (Python):
a=[]
N = int(input())
for i in range(N):
    a.append(int(input().strip()))


def gcd(a,b):
    if b==0:
        return a
    return gcd(b,a%b)

if N!=1:
    for i in range(len(a)-1):
        pr=a[i]*a[i+1]
        lcm=pr//gcd(a[i],a[i+1])
        a[i+1]=lcm
else:
    lcm=a[0]

print(lcm)

Solution (Python):
from collections import deque
N = int(input())



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



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


array = []
for _ in range(N):
    array.append(int(input()))

ans = array[0]
for x in array[1:]:
    ans = lcm(ans, x)


print(ans)

Solution (Python):
n = int(input())

def mnd(a, b):
    mod = a % b
    if mod == 0:
        return b
    else:
        return mnd(b, mod)

nd = int(input())
for _ in range(n - 1):
    tmp  = int(input())
    kouyaku = mnd(max(nd, tmp), min(nd, tmp))
    nd = nd * tmp // (kouyaku)
print(nd)

Solution (Python):
import sys
def 解():
    iN = int(sys.stdin.readline())
    aT = [int(_) for _ in sys.stdin.readlines()]
    
    def fgcd(a,b):
        while b:
            a,b = b, a%b
        return a

    lcm = aT[0]
    for a in aT[1:]:
        lcm = lcm * a // fgcd(lcm,a)
    print(lcm)
解()

Solution (Python):
N = int(input())
T = [int(input()) for i in range(N)]
result = T[0]

for i in range(1, N):
    n = T[i]
    m = result
    while n % m != 0:
        m, n = n%m, m
    result = (result * T[i]) // m

print(result)

Solution (Python):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
n = int(input())
lc = 1
for i in range(n):
    t = int(input())
    lc = lc * t // gcd(lc,t)
print(lc)

Solution (Python):
N = int(input())
T = sorted([int(input()) for i in range(N)])

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

if N == 1:
    print(T[0])
else:
    ans = T[0]
    for i in range(1, N):
        ans = (ans*T[i])//(gcd(ans, T[i]))
    
    print(ans)

Solution (Python):
N = int(input())
L = [ int(input()) for i in range(N)]

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

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

x = L[0]
for i in range(len(L)-1):
    y = lcm(x, L[i+1])
    x = y
    
print(x)

Solution (Python):
def gcd(a,b):
    if a%b == 0:
        return b
    return gcd(b,a%b)

N = int(input())
ans = 1
for _ in range(N):
    A = int(input())
    ans = ans*A//gcd(ans,A)
print(ans)

Solution (Python):
N = int(input())
T = []
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a

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

for i in range(N):
    T += [int(input())]
if len(T) == 1:
    print(T[0])
else:
    prev = T[0]
    for i in range(N-1):
        new = T[i+1]
        prev = lcm(prev, new)
    print(prev)

Solution (Python):
import fractions
n=int(input())
ans=1
for i in range(n):
  t=int(input())
  ans=ans*t//fractions.gcd(ans, t)
print(ans)

Solution (Python):
n=int(input())
ans=1
def gcd(a, b):
  if b==0:
    return a
  else:
    return gcd(b, a%b)
for i in range(n):
  t=int(input())
  ans=ans*t//gcd(ans, t)
print(ans)

Solution (Python):


n=int(input())
l = []
for i in range(0,n):
  l.append(int(input()))
  

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

res=l[0]
for i in range(1,n):
  res=lcm(res,l[i])
print(res)

Solution (Python):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
	return (a * b // gcd(a, b))

N = int(input())
t = int(input())
for i in range(N-1):
	T = int(input())
	t = lcm(t,T)
print(t)

Solution (Python):

N = int(input())
Tn = []
for _ in range(N):
    Tn.append(int(input()))

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

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

ans = 0
for T in Tn:
    if ans > 0:
        ans = lcm(ans,T)
    else:
        ans = T

print(ans)

Solution (Python):

from fractions import gcd

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

b = clocks[0]
for i in range(1, N):
  a = gcd(b, clocks[i])
  b = b * clocks[i] // a

print(b)

Solution (Python):
def LCM(a, b):
    s = a * b
    a, b = min(a, b), max(a, b)
    while a % b > 0:
        a, b = b, a % b
    return s // b

N = int(input())
ans = int(input())
for i in range(N-1):
    ans = LCM(ans, int(input()))
print(ans)

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

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

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

ans = 1
for value in range(0, N):
    ans = lcm(ans, T[value])

print(ans)

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(N)]
  
 
def gcd(a, b):
   while b > 0:
      a, b = b, a%b
   return a
  
 
def lcm(a, b):
   return a*b//gcd(a, b)
  
 
ans = T[0]
for i in range(N):
    ans = lcm(ans, T[i])
    
print(ans)

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(N)]
  
 
def gcd(a, b):
   while b > 0:
      a, b = b, a%b
   return a
  
 
def lcm(a, b):
   return a*b//gcd(a, b)
  
 
ans = T[0]
for i in range(N):
    ans = lcm(ans, T[i])
    
print(ans)

Solution (Python):
n = int(input())
T=[int(input()) for i in range(n)]


def euclid(a,b):
  r = a % b
  return euclid(b,r) if r else b

def lcm(a,b):
  return a * b //euclid(a,b)

num = T[0]
for i in range(1,n):
  num = lcm(num, T[i])
print(num)

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


def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


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


num = T[0]
for i in range(1, N):
    num = lcm(num, T[i])

print(num)

Solution (Python):
import fractions
s = 1
for _ in [0]*int(input()):
  x = int(input())
  s = s*x//fractions.gcd(s,x)
print(s)

Solution (Python):
import math
class MathAlgo(object):

    @classmethod
    def gcd(cls, a, b):
        if b == 0:
            return a
        else:
            return cls.gcd(b, a%b)

    @classmethod
    def lcm(cls, a, b):
        return a // cls.gcd(a, b) * b

N = int(input())
ans = int(input())
for i in range(N-1):
    ans = MathAlgo.lcm(ans, int(input()))
print(ans)

Solution (Python):
import fractions

n = int(input())
s = []
for i in range(n):
	s.append(int(input()))
x = 1
for i in range(n):
	x = x*s[i]//fractions.gcd(x,s[i])
print(x)

Solution (Python):
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)

Solution (Python):
def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x%y)

N = int(input())
T = [int(input()) for _ in range(N)]
lcm = 1
for t in T:
    lcm = lcm * t // gcd(lcm, t)
print(lcm)

Solution (Python):
import fractions

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

LCM = 1
for i in range(N):
    lcm = (T[i] * LCM) // (fractions.gcd(T[i], LCM))
    LCM = lcm

print(LCM)

Solution (Python):
import fractions
ans = 1
n = int(input())
for i in range(n):
  a = int(input())
  ans = (a * ans)//(fractions.gcd(a,ans))
print(ans)

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(N)]

def gcd(a,b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
def lcm(X,Y):
    return X*Y // gcd(X,Y) 

ans = 1

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

Solution (Python):
import sys
from functools import reduce

stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

def get_gcd(a:int, b:int) -> int:
    while b:
        a, b = b, a % b
    return a
    
def get_lcm(a:int, b:int) -> int:
    return (a // get_gcd(a,b)) * b


n = ni()
t = [ni() for _ in range(n)]

lcm = reduce(get_lcm, t)

print(lcm)

Solution (Python):
def gcd(x,y):
    if x < y:
        (x,y) = (y,x)
    while y > 0:
        r = x % y
        x = y
        y = r
    return x


n = int(input())
list_t = []
for i in range(n):
    list_t.append(int(input()))
g = list_t[0]
l = list_t[0]
for i in range(1,n):
    g = gcd(l,list_t[i])
    l = (l*list_t[i]) // g

print(l)

Solution (Python):
from sys import stdin
il = lambda func=int: list(map(func, stdin.readline().rstrip().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]
def gcd(a, b):
    if a < b: return gcd(b, a)
    if b == 0: return a
    return gcd(b, a%b)

n = int(input())
t = ils(n)
ans = t[0]
for i in t[1:]:
    ans = ans * i // gcd(ans, i)
print(ans)

Solution (Python):
from functools import reduce

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

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

def lcm_list(n):
    return reduce(lcm, n)

n = int(input())
t = [int(input()) for i in range(n)]
print(lcm_list(t))

Solution (Python):
n = int(input())
t = []
for _ in range(n):
    t.append(int(input()))
    
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a

ans = t[0]
for i in t[1:]:
    ans = ans*i//gcd(ans, i)
    
print(ans)

Solution (Python):
n = int(input())
t = [int(input()) for i in range(n)]

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)

def lcm(a, b):
    g = gcd(a, b)
    g_a = a // g
    g_b = b // g
    return g_a * g_b * g

ans = t[0]
for i in range(n-1):
    ans = lcm(ans, t[i+1])

print(ans)

Solution (Python):
import sys
stdin = sys.stdin

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())
   
from functools import reduce


def findGCD(a:int, b:int) -> int:
    
    while 1:
        if a%b == 0:
            return b
        else:
            a = a%b
        
        if b%a == 0:
            return a
        else:
            b = b%a
                

def findLCM(a:int, b:int) -> int:

    return (a//findGCD(a,b)) * b


n = ni()
ts = [ni() for _ in range(n)]

lcm = reduce(findLCM,ts)

print(lcm)

Solution (Python):
import fractions
N = int(input())
T = [int(input()) for i in range(N)]

lcm = 1
for t in T:
    lcm = lcm * t // fractions.gcd(lcm,t)
print(lcm)

Solution (Python):


import fractions
n=int(input()) 
t=[int(input()) for _ in range(n)]
ans=t[0]

for i in range(1,n):
  ans = (ans*t[i])//(fractions.gcd(ans,t[i]))
    
print(ans)

Solution (Python):
import numpy as np


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

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

N = int(input())
T = [int(input()) for _ in range(N)]

ans = 1
for t in T:
    ans = lcm_base(ans,t)
print(ans)