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())
T = [int(input()) for _ in range(N)]

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


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


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

Solution (Python):
from math import gcd

n = int(input())
g = int(input())

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

print(g)

Solution (Python):
import math
N = int(input())
lcm = int(input()) 
for i in range(N-1):
    x = int(input())
    lcm = lcm * x // math.gcd(lcm,x)
print(lcm)

Solution (Python):
import math

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

N,*T = map(int,open(0).read().split())

lcm = 1

for i in T:
  lcm = calc_lcm(lcm,i)
print(lcm)

Solution (Python):
import math
n=int(input());a=[int(input()) for _ in range(n)];r=a[0]
for i in a:
  r=r*i//math.gcd(r,i)
print(r)

Solution (Python):
import math
n=int(input());a=[int(input()) for _ in range(n)];r=a[0]
for i in a: r=r*i//math.gcd(r,i)
print(r)

Solution (Python):
import math

a=[int(input()) for _ in range(int(input()))]
r=a[0]
for i in range(len(a)):
  r=r*a[i]//math.gcd(r,a[i])
print(r)

Solution (Python):
import math

n=int(input())
a=[int(input()) for _ in range(n)]
r=a[0]
for i in a:
  r=r*i//math.gcd(r,i)
print(r)

Solution (Python):
import math

n=int(input())
a=[int(input()) for _ in range(n)]
if n==1:
  print(a[0])
elif n==2:
  print(a[0]*a[1]//math.gcd(a[0],a[1]))
else:
  r=a[0]*a[1]//math.gcd(a[0],a[1])
  for i in a:
    r=r*i//math.gcd(r,i)
  print(r)

Solution (Python):
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
T = [INT() for _ in range(N)]

tmp = T[0]
for i in range(1, len(T)):
    tmp = (tmp * T[i]) // gcd(tmp, T[i])
print(tmp)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect, bisect_left, bisect_right

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
T = [INT() for i in range(N)]

def many_lcm(l):
    tmp = l[0]
    for i in range(1, len(l)):
        tmp = tmp * l[i]//gcd(tmp, l[i])
    return tmp

print(many_lcm(T))

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N = INT()
    T = [INT() for _ in range(N)]

    lcm_base = lambda x, y: (x * y) // gcd(x, y)
    lcm = lambda *numbers: reduce(lcm_base, numbers, 1)
    print(lcm(*T))


if __name__ == '__main__':
    main()

Solution (Python):
import functools


def lcm(nums):
        return functools.reduce(multiple, nums)

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

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

n = int(input())
l = []
for _ in range(n):
    a = int(input())
    l.append(a)

print(lcm(l))

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


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


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

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

Solution (Python):
import math
N = int(input())
T = [int(input()) for _ in range(N)]
 
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
 
ans = 1
 
for i in range(N):
    ans = lcm(ans,T[i])
 
print(ans)

Solution (Python):
import math
n = int(input())
t = list(int(input()) for i in range(n))
s = t[0]
for i in range(1,n):
    s = s * t[i] // math.gcd(s,t[i])
print(s)

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

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

Solution (Python):
import math
from functools import reduce

n = int(input())
t = list(int(input()) for _ in range(n))

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

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


print(lcm_list(t))

Solution (Python):
from math import gcd
n = int(input())
t = int(input())
ans = t
for i in range(n - 1):
    t = int(input())
    g = gcd(ans, t)
    ans *= t//g

print(ans)

Solution (Python):
import math
def lcm(l):
    r=l.pop(0)
    for i in l:
        r=r*i//math.gcd(r,i)
    return r

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

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

def lcm(l):
  x = l[0]
  for i in range(1, len(l)):
    x = (x * l[i]) // gcd(x, l[i])
  return x

print(lcm(l))

Solution (Python):
import math
from functools import reduce

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

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

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

n = int(input())
t = []
for i in range(n):
  t_ = int(input())
  t.append(t_)
  
print(lcm(*t))

Solution (Python):
import math

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

ans=t[0]

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

Solution (Python):
import math
n = int(input())
t = [int(input()) for i in range(n)]
lcm = t[0]
for h in range(1,n):
    lcm = (lcm*t[h])//math.gcd(lcm,t[h])
print(lcm)

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


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):
    return (a * b) // gcd(a, b)


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

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

Solution (Python):
from math import gcd

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

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

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

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

print(ans)

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)
n=int(input())
t=[]
for i in range(n):
    tmp=int(input())
    if tmp in t:
        continue
    t.append(tmp)

ans=1
for i in t:
    ans=lcm(ans,i)
print(ans)

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

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

Solution (Python):
import math

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

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

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

print(LCM)

Solution (Python):
from math import gcd

def lcm(X, Y):
    return (X * Y) // gcd(X, Y)

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

ans = 1
for i in t:
    ans = lcm(ans, i)
print(ans)

Solution (Python):
from math import gcd
n=int(input())
a=int(input())
for _ in range(n-1):
  i=int(input())
  a=a*i//gcd(a,i)
print(a)

Solution (Python):
import math
def lcm(x, y):return (x * y) // math.gcd(x, y)
n = int(input())
a = [int(input()) for i in range(n)]
ans = 1
for i in a:ans = lcm(ans,i)
print(ans)

Solution (Python):
from math import gcd
n = int(input())

time = list(int(input()) for _ in range(n))

ans = time[0]

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

print(int(ans))

Solution (Python):
import math
def lcm(a,b):
  return (a*b)//math.gcd(a,b)
N=int(input())
s=1
for i in range(N):
  n=int(input())
  s=lcm(s,n)
print(s)

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


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


n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
ans = a[0]
for x in range(1, n):
    ans = lcm(ans, a[x])

print(ans)

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    T = [I() for _ in range(N)]

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

    print(ans)

if __name__ == '__main__':
    resolve()

Solution (Python):
import fractions

n,*t=map(int,open(0).read().split())

if n==1:
    print(t[0])
else:
    g=fractions.gcd(t[0],t[1])
    l=t[0]*t[1]//g

    for i in range(2,n):
        l=t[i]*l//fractions.gcd(l,t[i])
        g=fractions.gcd(l,t[i])

    print(l)

Solution (Python):
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007



def ppp(a,b):
	while b >= 1:
		a,b = b, a % b
	return a

def main():
	n = int(input())
	
	
	ret = 1
	for _ in range(n):
		v = int(input())
		ret = (ret*v) //ppp(ret, v)
	print(ret)
	
	

isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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())
def sai(a,b):
  import math
  v=math.gcd(a,b)
  return a*b//v
ans=int(input())
for i in range(n-1):
  b=int(input())
  ans=sai(ans,b)
print(ans)

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)

n = int(input())
t1 = int(input())
ans = t1
for _ in range(n-1):
    t2 = int(input())
    ans = lcm(ans, t2)
print(ans)

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

N=int(input())
T=[]
if N==1:
  print(input())
  exit()
for i in range(N):
  t = int(input())
  T.append(t)
  if i == 0:continue
  elif i == 1:
    lcm = T[-2]*T[-1]//gcd(T[-2],T[-1])
  else:
    lcm = lcm * T[-1]//gcd(lcm,T[-1])

print(lcm)

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)
print reduce(lcm, [int(raw_input()) for oo in range(int(raw_input()))])

Solution (Python):
import math
from functools import reduce

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

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

N = int(input())

print(lcm_list([int(input()) for i in range(N)]))

Solution (Python):
import math
from functools import reduce

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

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

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

print(lcm_list(t))

Solution (Python):
import math
from functools import reduce

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

def lcm_base(x, y):
    return (x * y) // math.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(S))

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)

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

Solution (Python):
from math import gcd
N = int(input())
ans = int(input())
for _ in range(N - 1):
    t = int(input())
    ans = (t * ans) // gcd(ans, t)
print(ans)

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

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
from math import gcd

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

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

def solve(n,ts):
    a = ts[0]
    for i in range(n):
        b = ts[i]
        c = gcd(a,b)
        a = a*b//c
    return a

if __name__ == '__main__':
    n = int(input())
    ts = [int(input()) for i in range(n)]
    print(solve(n,ts))

Solution (Python):
import math
N = int(input())
T =  list(int(input()) for n in range(N))
ans = T[0]

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

Solution (Python):
from math import gcd

def lcm(X, Y):  
    return (X * Y) // gcd(X, Y)


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

ans = 1
for i in t:
    ans = lcm(ans, i)
print(ans)

Solution (Python):
import sys
from math import gcd
def input(): return sys.stdin.readline().strip()


def main():
    n = int(input())
    ans = int(input())
    for _ in range(n - 1):
        val = int(input())
        ans = ans * val // gcd(ans, val)
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
from math import gcd

n=int(input())

lcm=0
for i in range(n):
  t=int(input())
  if lcm==0:
    lcm=t
  else:
    lcm=(t*lcm)//gcd(t,lcm)

print(lcm)

Solution (Python):
import math

n=int(input())
ans=int(input())

if n>1:
  
  for x in range(n-1):
    s=int(input())
    ans=ans*s//(math.gcd(ans,s))
    
  
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):
import math
from functools import reduce


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


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


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


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

print(lcm(*T))

Solution (Python):
import math
from functools import reduce


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


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


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


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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N = int(input())
from math import gcd

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

print(ans)

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

Solution (Python):
N = int(input())
T = [int(input()) for _ in range(N)]
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
print(lcm(*T))

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

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)
print(lcmm(T_list))

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

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re












import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
T = [I() for _ in range(n)]
def lcm(a,b):
    g = gcd(a,b)
    return a // g * b
ans = 1
for i in range(n):
    ans = lcm(ans,T[i])
print(ans)

Solution (Python):
import sys
import math

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

n = ini()
T = [ini() for _ in range(n)]


def solve():
    a = T[0]
    for t in T[1:]:
        g = math.gcd(a, t)
        a = g * (a // g) * (t // g)
    return a


print(solve())

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

Solution (Python):
import math
from functools import reduce
n = int(input())
t = [int(input()) for _ in range(n)]

def lcm_base(x,y):
    return (x*y)//math.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(t))

Solution (Python):
from math import gcd
import sys

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])
    sys.exit()

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

print(l)

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


def gcd(x, y):
    if x < y:
        t = x
        x = y
        y = t

    if y == 0:
        return x

    else:
        return gcd(y, x % y)


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

res = T[0] * T[1] // gcd(T[0], T[1])

if N > 2:
    for i in range(2, N):
        r = res * T[i] // gcd(res, T[i])
        res = max(r, res)

print(res)

Solution (Python):
from collections import defaultdict
from collections import deque
from collections import Counter
import itertools
import math

def readInt():
  return int(input())
def readInts():
  return list(map(int, input().split()))
def readChar():
  return input()
def readChars():
  return input().split()

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

ans = 1
n = readInt()
for j in [readInt() for i in range(n)]:
  ans = f(ans,j)

print(ans)

Solution (Python):

def gcd(m,n):
    from math import gcd as g
    return g(m,n)
        
def GCD(*X):
    from functools import reduce
    return reduce(gcd,X)


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

def LCM(*X):
    from functools import reduce
    return reduce(lcm,X)


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

Solution (Python):
from math import gcd
from functools import reduce
f = lambda x,y: x*y//gcd(x,y)
print(reduce(f, [int(input()) for _ in range(int(input()))]))

Solution (Python):
import math
def LCM(X,Y):
    return (X*Y)//math.gcd(X,Y)
  
N = int(input())
A = [int(input()) for T in range(0,N)]
TLCM = 1
for T in range(0,N):
    TLCM = LCM(TLCM,A[T])
print(TLCM)

Solution (Python):
from math import gcd

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

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

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

Solution (Python):
import sys
from math import gcd

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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


def main():
    N, *T = map(int, read().split())

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

    print(ans)
    return


if __name__ == '__main__':
    main()

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

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

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

n=int(input())
t=list(map(int,sys.stdin.read().split()))
print(lcm_list(t))

Solution (Python):
from math import gcd
n=int(input())
lc=int(input())
for i in range(n-1):
    t=int(input())
    gc=gcd(lc,t)
    lc=(t*lc)//gc
print(lc)

Solution (Python):
def cin():
    in_ = list(map(int,input().split()))
    if len(in_) == 1:  return in_[0]
    else:  return in_

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

def gcd(l):
    ans = l[0]
    for i in l:  ans = gcd_(ans, i)
    return ans

def lcm_(x,y):
    return (x * y) // gcd_(x, y)

def lcm(l):
    ans = l[0]
    for i in l:  ans = lcm_(ans, i)
    return ans

N = cin()
a = [cin() for _ in range(N)]
print(lcm(a))

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

ans = np.lcm.reduce(t)
print(ans)

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

res = 1
for _ in range(N):
    T = int(input())
    res = res*T//gcd(res, T)

print(res)

Solution (Python):
from functools import reduce
from math import gcd
N = int(input())
T = 0
for i in range(N):
    if not T:
        T = int(input())
    else:
        t = int(input())
        T = T*t//gcd(T,t)
print(T)

Solution (Python):






import math
from functools import reduce





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





def lcm_base(x,y):
    return (x*y)//math.gcd(x,y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)





print(lcm_list(T))

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


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

Solution (Python):
import math

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

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

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

print(ans)

Solution (Python):
from math import gcd
N,*T = map(int, open(0).read().split())
if N == 1:
    print(T[0])
else:
    temp = (T[0]*T[1]) // gcd(T[0],T[1])
    for i in range(2,N):
        temp = (temp*T[i]) // gcd(temp,T[i])
    print(temp)

Solution (Python):
from math import gcd

n = int(input())

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

print(res)

Solution (Python):
from math import gcd
n=int(input())
l=1
for _ in range(n):
  t=int(input())
  l=l//gcd(l,t)*t
print(l)

Solution (Python):
import math
from functools import reduce

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

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

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

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

print(lcm(*c))

Solution (Python):
import math
import sys
n = int(input())
t = [int(input()) for _ in range(n)]
if n == 1:
  print(t[0])
  sys.exit()
elif n == 2:
  print((t[0]*t[1])//(math.gcd(t[0],t[1])))
  sys.exit()
t.sort()
ans = (t[0]*t[1])//math.gcd(t[0],t[1])
for i in range(2,n-1):
    
    ans =((t[i]*ans)//math.gcd(t[i],ans))
print((ans*t[-1])//math.gcd(ans,t[-1]))

Solution (Python):


import math

import itertools
from collections import deque
from collections import Counter

from fractions  import gcd

import bisect
n=int(input())
def lcm(a,b):
    g=gcd(a,b)
    res=g*(a//g)*(b//g)
    return res
l=int(input())
for i in range(n-1):
    ti=int(input())
    l=lcm(l,ti)
print(l)

Solution (Python):
from numpy import *
print(lcm.reduce([int(input()) for n in range(int(input()))]))

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

t1 = 1
for i in range(N):
    t2 = int(input())
    t1 = (t1 * t2) // math.gcd(t1, t2)

print(t1)

Solution (Python):

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

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

def f(tmp):
    tmp.sort(reverse=True)
    result=[]
    for i in tmp[1:]:
        if tmp[0]%i == 0:
            tmp.remove(i)
    for i in range(1,len(tmp)):
        result.append(lcm(tmp[0],tmp[i]))
    else:
        if result:
            return result
        else:
            return tmp
if __name__ == "__main__":
    n=int(input())
    t=[]
    for _ in range(n):
        t.append(int(input()))
    t.sort(reverse=True)
    if len(t)<2:
        print(t[0])
        exit(0)
    tmp=[]
    for i in range(1,n):
        tmp.append(lcm(t[0],t[i]))
    while len(tmp) > 1:
        tmp=f(tmp)
    if tmp[0] >1000000000000000000:
        print(1000000000000000000)
    else:
        print(tmp[0])

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

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

Solution (Python):
import math

num = 1
for i in range(int(input())):
    a = int(input())
    cnt = math.gcd(a, num)
    num = (a * num) // cnt
print(num)

Solution (Python):
import math
from functools import reduce

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

def lcm(nums):
    return reduce(lambda x, y: lcm2(x, y), nums)

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

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

print(lcm(T))

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

Solution (Python):
n=int(input())
l=[]

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


def lcm(a,b):
  ori_a=a
  ori_b=b
  while b!=0:
      a,b=b,a%b
  return (ori_a*ori_b)//a
  

ans=1
for i in l:
  ans=lcm(ans,i)

print(ans)

Solution (Python):
from math import gcd

n = int(input())

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

Solution (Python):
import sys
import math

if __name__ == "__main__":
	n = int(input())
	lst = []
	for _ in range(n):
		lst.append(int(input()))
	q = lst[0]
	for x in range(1, n):
		q = (q*lst[x])//math.gcd(lst[x], q)
	print(q)

Solution (Python):

import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd




def lcm(x, y):
    return x * y // gcd(x, y)
def solve():
    n = int(input())
    ans = 0
    for i in range(n):
        t = int(input())
        if i:
            ans = lcm(ans, t)
        else:
            ans = t
    print(ans)
    

        
    
t = 1

for case in range(1,t+1):
    ans = solve()


"""

7
3 1
4 1
5 9
2 6
5 3
5 8
9 7 5

"""

Solution (Python):
import math
from functools import reduce

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

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

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

print(lcm_list(t))

Solution (Python):
from math import gcd
answer = 1
for _ in range(int(input())):
  T = int(input())
  answer = answer*T//gcd(answer,T)
print(answer)

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

Solution (Python):

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


if N==1:
    f2 = T[0]

elif N==2:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f

else:
    import math
    a,b = T[0], T[1]
    f=math.gcd(a,b)
    f2=a*b//f
    for i in range(2,N):
        a,b=f2, T[i]
        f=math.gcd(a,b)
        f2=a*b//f

print(f2)

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

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

mod = 10**9+7
sys.setrecursionlimit(mod) 

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

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

def LCM(T):
    lcm = 1
    for t in T:
        lcm = lcm * t // math.gcd(t, lcm)
    return lcm

print(LCM(T))

Solution (Python):
import math
from functools import reduce

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

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

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