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):
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 _ in range(n)]
ans = 1
for i in range(n):
    ans = lcm(ans, t[i])
print(ans)

Solution (Python):
from functools import reduce

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

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

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

res = reduce(lcm, t)

print(res)

Solution (Python):
from fractions import gcd

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

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

print(ans)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
import bisect
import sys
import logging
import heapq



input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	n = int(input())
	t = [int(input()) for _ in range(n)]
	print(lcm(t))

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

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

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

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def euqrid(a, b):
    if a > b:
        large = a
        small = b
    else:
        large = b
        small = a

    if small == 0:
        return large
    return euqrid(small, large % small)


def calc_m(numbers):
    if len(numbers) == 1:
        return numbers[0]
    if len(numbers) == 2:
        a = numbers.pop()
        b = numbers.pop()
        e = euqrid(a, b)
        return a * b // e
    a = numbers.pop()
    b = calc_m(numbers)
    e = euqrid(a, b)
    return a * b // e


def solve(inputs):
    clocks = inputs
    return calc_m(clocks)


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(int_inputs(N))
    print(ret)

Solution (Python):
import sys
import fractions
from functools import reduce
input = sys.stdin.readline

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

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(t))

Solution (Python):

import sys
import fractions
from functools import reduce

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

def solve(N: int, T: "List[int]"):
    print(reduce(lcm,T))
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    T = [int(next(tokens)) for _ in range(N)]  
    solve(N, T)

if __name__ == '__main__':
    main()

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

	
if n==1:
	print(t[0])
	exit()

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

Solution (Python):
import sys
import os
sys.setrecursionlimit(100000000)

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

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)]
if N == 1:
    print(T[0])
    sys.exit()

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

Solution (Python):


import fractions

N=int(input())

a=int(input())
for _ in range(N-1):
    b=int(input())
    f=fractions.gcd(a,b)
    a=a*b//f

print(a)

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

Solution (Python):
def LCM(x,y):
    return x*y//GCD(x,y)

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

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

print(ans)

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

n = int(input())
t = []

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

print(reduce(lambda x, y: x * y // gcd(x, y), t))

Solution (Python):
def gcd(x,y):
    while y!=0:
        x,y=y,x%y
    return x
def lcm(x,y):
    return (x*y)//gcd(x,y)
n=int(input())
t=int(input())
for i in range(n-1):
    t=lcm(t,int(input()))
print(t)

Solution (Python):
N=int(input())
T=[int(input()) for i in range(N)]
T.sort()
ans=1
for i in range(N):
  A,B=ans,T[i]
  while(A):
    B%=A
    A,B=B,A
  ans=ans*T[i]//B
print(ans)

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

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

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

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

n,*t = map(int,sys.stdin)
print(lcm(*t))

Solution (Python):
import fractions

N = int(input())
T = list(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):

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())
g=int(input())
for n in range(N-1):
    t=int(input())
    g=lcm(g,t)
print(g)

Solution (Python):

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


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

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

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

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

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

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

Solution (Python):
import fractions, functools
def lcm_base(x, y):
  return (x * y) // fractions.gcd(x, y)

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

n = int(input())
list_t = [int(input()) for _ in range(n)]
print(lcm_list(list_t))

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

ans=T[0]
for i in range(N-1):
  ans=ans*T[i+1]//gcd(ans,T[i+1])

print(ans)

Solution (Python):
import fractions

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

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

ans = T[0]

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

print(ans)

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

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

print(reduce(get_lcm, T))

Solution (Python):
def gcd(x,y):
    if x<y:
        x,y = y,x
    while y>0:
        x,y = y,x%y
    return x
N = int(input())
T = list(set([int(input()) for _ in range(N)]))
t = 1
b = T[0]
for i in range(1,len(T)):
    a = gcd(T[i],b)
    b = a*(T[i]//a)*(b//a)
print(b)

Solution (Python):
import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

n = int(input())
T = [int(input()) for _ in range(n)]
p = 1
for i in T:
  ans = lcm(i,p)
  p = ans
print(ans)

Solution (Python):
def lcm(a,b):
    if a%b !=0:
        return lcm(b,a%b)
    else:
        return b
def gcm(a,b):
    l=lcm(a,b)
    return a*b//l

def main():
    n=int(input())
    t=[int(input()) for i in range(n)]
    ans = t[0]
    if n==1:
        print(t[0])
        exit()
    for i in t[1:]:
        ans=gcm(ans,i)
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):


def input():
    import sys
    return sys.stdin.readline().rstrip()


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

def main():
    import math
    import collections
    import itertools
    import functools

    n = int(input())
    ts = [int(input()) for _ in range(n)]
    ans = functools.reduce(lcm, ts)
    print(ans)
        
if __name__ == '__main__':
    main()

Solution (Python):
import fractions
n=int(input())
t=[]
for i in range(n):
  t.append(int(input()))
a=t[0]
for i in range(n-1):
  a=(a*t[i+1])//(fractions.gcd(a,t[i+1]))
print(a)

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

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)

ans = T[0]
for i in range(N):
    ans = lcm(ans, T[i])
print(ans)

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

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

ans = T[0]

for i in range(n):
    ans = ans*T[i]//gcd(ans,T[i])

print(ans)

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

def solve():
    n = int(input())
    a = int(input())
    for _ in range(n-1):
        b = int(input())
        a = a*b//gcd(a,b)
    return a

if __name__ == '__main__':
    print(solve())

Solution (Python):

from fractions import gcd

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

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

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

for i in range(N-1):
    if i == 0:
        ans = lcm(T[0],T[1])    
    t = lcm(ans,T[i+1])
    ans = max(ans,t)

if len(T) == 1:
    print(T[0])
else:
    print(ans)

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)
print(reduce(lcm, T))

Solution (Python):

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

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

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

ret = 1
for t in T:
    ret = lcm(ret, t)
print(ret)

Solution (Python):
import fractions

from functools import reduce

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

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

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

print(lcm(*T))

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

Solution (Python):
def slove():
    import sys
    import fractions
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    ans = 1
    for i in range(n):
        t = int(input().rstrip('\n'))
        ans = ans * t // fractions.gcd(ans, t)
    print(ans)


if __name__ == '__main__':
    slove()

Solution (Python):
import fractions
from functools import reduce

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

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(T))

Solution (Python):
def gcd(n,m):
  if n<m:
    n,m=m,n
  if n%m:
    return gcd(m,n%m)
  else:
    return m

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

Solution (Python):
import fractions as fr
from functools import reduce

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

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

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

print(lcm(*t))

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

Solution (Python):
from fractions import gcd

n = int(input())
ans = int(input())
for i in range(n - 1):
    t = int(input())
    ans = t * ans // gcd(t, ans)

print(ans)

Solution (Python):
from fractions import gcd

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

lcm=t[0]
for i in range(n-1):
    lcm=(t[i]*t[i+1]//gcd(t[i],t[i+1]))
    t[i+1]=lcm
print(lcm)

Solution (Python):
import fractions
from functools import reduce

def lcm_base(A, B):
    return (A * B) // fractions.gcd(A, B)

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

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

print(lcm(T))

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

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

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

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

T=int(input())

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

Solution (Python):
from fractions import gcd


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


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


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

Solution (Python):
N = int(input())
l = [int(input()) for _ 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)

ans = lcm(l[0], l[1]) if N >= 2 else l[0]
for i in range(2, N):
    ans = lcm(ans, l[i])
print(ans)

Solution (Python):
from fractions import gcd
N = int(input())
p = int(input())
for _ in range(N - 1):
  q = int(input())
  g = gcd(p, q)
  p = p * q // g
print(p)

Solution (Python):
import sys
import fractions
from collections import Counter, deque, defaultdict
from math import factorial
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

n = INT()
t = [0]*n
for i in range(n):
    t[i] = INT()

def lcm(a,b):
    gcd = fractions.gcd(a,b)
    a//=gcd
    b//=gcd
    return a*b*gcd
    
if n == 1:
    print(t[0])
    sys.exit()

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

print(res)

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

Solution (Python):
import fractions
n=int(input())
ans=1
t=[0]*n
for i in range(n):
    t[i]=int(input())

for i in t:
    ans=ans*i//fractions.gcd(ans,i)
print(ans)

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

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

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

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

N = int(input())
T = [int(input()) for _ in range(N)]
l = reduce(lcd, T)
print(l)

Solution (Python):
from fractions import gcd
N = int(input())
t = list(int(input()) for _ in range(N))
tmp = gcd(0, t[0])
ans = tmp
for i in range(1, N):
    l = ans
    tmp = gcd(ans, t[i])
    ans = (l * t[i]) // tmp

print(ans)

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


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


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

print(ans)

Solution (Python):
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

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

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

for i in range(N):
    a = a*T[i]//gcd(a,T[i])

print(a)

Solution (Python):
import fractions

N = int(input())
T = list(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):


from fractions import gcd
N = int(input())
T = [int(input()) for i in range(N)]

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

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

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

print(num)

Solution (Python):
import sys
import math
from fractions import gcd


from itertools import accumulate
from functools import reduce

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

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


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


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


N = int(sys.stdin.readline())
L = [int(sys.stdin.readline().rstrip()) for _ in range(N)]

print(reduce(lcm, L))

Solution (Python):
import sys
import math
from fractions import gcd


from itertools import accumulate
from functools import reduce

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

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


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


 = int(sys.stdin.readline())
 = map(int, sys.stdin.readline().split())
 = list(map(int, sys.stdin.readline().split()))
 = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""


N = int(sys.stdin.readline())
L = [int(sys.stdin.readline().rstrip()) for _ in range(N)]

x = 1
for l in L:
    x = lcm(x, l)

print(x)

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(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())


from fractions import gcd
from functools import reduce

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

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

num_list=[]
for _ in range(n):
    num_list.append(int(input()))
print(lcm(*num_list))

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

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

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

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


from fractions import gcd
from functools import reduce

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

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

num_list=[]
for _ in range(n):
    num_list.append(int(input()))
print(lcm(*num_list))

Solution (Python):

from fractions import gcd
n=int(input())
glm=1
for i in range(n):
    nums=int(input())
    glm=int(glm*nums//gcd(nums,glm))
print(glm)

Solution (Python):
import fractions

n = int(input())
a = 1

for b in range(n):
    b = int(input())
    a = a*b//fractions.gcd(a, b)
print(a)

Solution (Python):
import sys
from collections import defaultdict, deque
from functools import reduce
import math

input = sys.stdin.readline

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

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)

def main():
    N = int(input())
    T = [int(input()) for _ in range(N)]
    print(lcm(*T))


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
l=list(set([int(input()) for d in range(n)]))  
a=l[0]
def gcd(a,s):
  a,s=min(a,s),max(a,s)
  if a==0:return s
  else:return gcd(s%a,a)

for i in l[1:]:
  a=a*i//gcd(a,i)
print(a)

Solution (Python):
import fractions as math
n=int(input())
T=[]
for  i in range(n):
	T.append(int(input()))

ans=T[0]
for i in range(1,len(T)):
	ans=ans*T[i]//math.gcd(int(ans),T[i])


print(int(ans))

Solution (Python):
def gcm(a,b):
    if a < b:
        a,b = b,a
    while True:
        if a % b == 0:
            return b
        else:
            a,b = b,a % b

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

N = int(input())
Data = []
for _ in range(N):
    Data.append(int(input()))
ans = Data[0]
for i in range(1,N):
    ans = lcm(ans,Data[i])
print(ans)

Solution (Python):
from functools import reduce
from fractions import gcd
n = int(input())
T = [int(input()) for i in range(n)]
lcd = reduce(lambda x, y: x * y // gcd(x, y), T)
print(lcd)

Solution (Python):
import fractions as f

N = int(input())
ans = int(input())
for i in range(1, N):
    T_i = int(input())
    tmp = ans * T_i // f.gcd(ans, T_i)
    ans = tmp
print(ans)

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


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


n = int(input())
ls = [int(input()) for _ in range(n)]
res = ls[0]
for x in ls[1:]:
    res = lcm(res, x)
print(res)

Solution (Python):



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


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


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

ans = 1
for ele in t:
    ans = lcm(ans, ele)

print(ans)

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

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

def lcm(x, y):
    return x*y // gcd(x,y)
answer = reduce(lcm, T)
print(answer)

Solution (Python):
from fractions import*;_,*t=map(int,open(0));l=1
for a in t:l=l*a//gcd(l,a)
print(l)

Solution (Python):
from collections import deque
N = int(input())
T = list(set([int(input()) for _ in range(N)]))
ret = T[0]

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

for t in T[1:]:
  ret = ret * t // gcd(ret, t)
  
print(ret)

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

least_common = t[0]

for i in range(1, n):
    a = least_common
    b = t[i]
    while a % b != 0:
        temp = b
        b = a % b
        a = temp
    least_common = least_common * t[i] // b

print(least_common)

Solution (Python):
import fractions

import sys
def input():
	return sys.stdin.readline().strip()

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

ans = T[0]
for i in range(N - 1):
	ans = (ans * T[i + 1])//fractions.gcd(ans, T[i + 1])
print(ans)

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


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

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

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 _ in range(N)]
if N == 1:
    print(T[0])
    exit()

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

Solution (Python):
N = int(input())
T0 = int(input())
p = T0
G = T0
ans = T0
from fractions import gcd
for i in range(N-1):
    T = int(input())
    p *= T
    G = gcd(ans,T)
    ans = ans*T//G
print(ans)

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


def resolve():
    n = int(input())
    t = list(int(input()) for _ in range(n))
    res = 1
    for ti in t:
        res = lcm_base(res, ti)
    print(res)


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


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


if __name__ == "__main__":
    resolve()

Solution (Python):
from fractions import gcd
N = int(input())
T = [int(input()) for _ in range(N)]
T = list(set(T))
l = T[0]
for i in range(1,len(T)):
  temp = l
  g = gcd(temp,T[i])
  l = l * T[i] // g
  
print(l)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7

def resolve():
    n=int(input())
    ans=1
    from fractions import gcd
    for _ in range(n):
        t=int(input())
        ans=ans*t//(gcd(ans,t))
    print(ans)
resolve()

Solution (Python):
n = int(input())
t = [int(input()) for i 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)

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

print(res)

Solution (Python):
from fractions import gcd

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

def getN():
    return int(input())


n = getN()
ans = 1
for i in range(n):
    t = getN()
    ans = lcm(ans, t)

print(ans)

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

Solution (Python):
n = int(input())
from fractions import gcd
ans = 1
for _ in range(n):
    t1 = int(input())
    ans = ans * t1 // gcd(ans, t1)
print(ans)

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

Solution (Python):

import sys
from fractions import gcd

from functools import reduce

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


def solve(N: int, T: "List[int]"):
    print(reduce(lcm, T))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    T = [int(next(tokens)) for _ in range(N)]  
    solve(N, T)

if __name__ == '__main__':
    main()

Solution (Python):


def computeGCD(x, y): 
   while(y): 
       x, y = y, x % y 
   return x 
   
   
def min(a, b):
	if a > b:
		return b
	else:
		return a

def max(a, b):
	if a > b:
		return a
	else:
		return b



def main():
	clocks = []
	n = int(input())
	for i in range(n):
		clocks.append(int(input()))
	x = clocks[0]
	for i in range(1, n):
		div = computeGCD(x, clocks[i])
		x = (x * clocks[i]) // div
	print(x)




if __name__ == "__main__":
	main()

Solution (Python):
from collections import Counter,defaultdict
import sys,heapq,bisect,math,itertools,string,queue,fractions
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))
def inpl_str(): return list(sys.stdin.readline().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

n = inp()
t = inpln(n)
tmp = t[0]
for i in range(n-1):
    tmp = lcm(tmp, t[i+1])
print(tmp)

Solution (Python):
from fractions import gcd

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

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

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


ans = 1
for i in range(N):
	ans = (ans * T[i]) // Eucrid(ans, T[i])

print(ans)

Solution (Python):
from fractions import gcd
import sys
input = sys.stdin.readline

N = int(input())

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

ans = T[0]

T= set(T)

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

Solution (Python):
import fractions
N = int(input())
a= []
for i in range(N):
  a.append(int(input()))
ans = a[0]
for i in range(1, N):
  ans = ans * a[i] // fractions.gcd(ans, a[i])
print(ans)

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

print(s)

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

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)