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 main():
    N = int(input())
    T = [0] * N

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


main()

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 t in T:
    ans = lcm(t, ans)

print(ans)

Solution (Python):
from fractions import gcd                                                                   
                                                                                            
def main():                                                                                 
    N = int(input())                                                                        
    tt = [int(input()) for _ in range(N)]                                                   
    ans = tt[0]                                                                             
    for t in tt[1::]:                                                                       
        ans = ans*t//gcd(ans,t)                                                             
    print(ans)                                                                              
                                                                                            
                                                                                            
if __name__ == '__main__':                                                                  
    main()

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


def l_c_m(x, y):
    return x * y // g_c_d(x, y)


a = int(input())
b = [int(input()) for _ in range(a)]
c = 1
for i in range(a):
    c = l_c_m(c, b[i])
print(c)

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())
for i in range(n):
    if i==0:
        tmp=int(input())   
    else:
        tmp=lcm(tmp,int(input()))
print(tmp)

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007


def A():
    n = S()
    n1 = n[::-1]
    for i in range(len(n)):
        if n1[i] != n[i]:
            print("No")
            return
    print("Yes")
    return


def B():
    a, b, c, d = LI()
    ans = [0 for i in range(101)]
    ans[a] += 1
    ans[b] -= 1
    ans[c] += 1
    ans[d] -= 1
    for i in range(100):
        ans[i+1] += ans[i]
    print(ans.count(2))

def C():
    n = II()
    ans = 1
    def gcd(a, b):
        while b:
            a, b = b, a % b
        return a
    for _ in range(n):
        t = II()
        ans = ans // gcd(ans, t) * t
    print(ans)
    return


def D():
    return


if __name__ == '__main__':
    C()

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

Solution (Python):


import math

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

n = int(input())

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

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

print(ans)

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

Solution (Python):
import fractions


def main():
    N = int(input())
    ans = int(input())
    for i in range(N-1):
        T = int(input())
        ans = (ans * T) // fractions.gcd(ans, T)  
        ans = int(ans)
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
from functools import reduce

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


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


def gcd(numbers):  
    return reduce(gcd_base, numbers)


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


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


print(lcm(T))

Solution (Python):
from functools import reduce

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


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


def gcd(numbers):  
    return reduce(gcd_base, numbers)


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


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


print(lcm(T))

Solution (Python):
import sys, re
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

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 = 1
for i in T:
	tmp = (tmp * i)//gcd(tmp, i)

print(tmp)

Solution (Python):
import math
from functools import reduce

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


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


print(lcm(T))

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

def lcm(a,b):
    return a*b//fractions.gcd(a,b)
ans = 1
for i in range(N):
    ans = lcm(ans,T[i])
print(ans)

Solution (Python):
def gcd(S, T):
  if (S % T == 0):
    return T
  else:
    S = S % T
    return gcd(T, S)

def lcm(S, T):
  return S * T // gcd(S,T)

N = int(input())
S = int(input())

for i in range(N-1):
    T = int(input())
    S = lcm(max(S, T), min(S, T));

print(S)

Solution (Python):
import sys


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


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


fin = sys.stdin.readline
N = int(fin())
T_list = tuple(int(fin()) for _ in range(N))
l = T_list[0]
for T in T_list[1:]:
    l = lcm(l, T)
print(l)

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

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

    print(reduce(lambda x,y: lcm(x,y), T, 1))

def main():
    N = int(input())
    T = [ int(input()) for _ in range(N) ]
    solve(N, T)

if __name__ == "__main__":
    main()

Solution (Python):
import sys
sys.setrecursionlimit(100000)

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):
    return int((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())
dat = []
for i in range(n):
    dat.append(int(input()))



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

res = dat[0]

for i in range(n):
    res = lcm(res, dat[i])

print(res)

Solution (Python):
N = int(input())
dict = {}
for _ in range(N):
    t = int(input())
    if t not in dict:
        dict[t] = 1

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

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

ans = 1
for k in dict.keys():
    ans = lcm(ans, k)

print(ans)

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

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

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

ans = 1

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

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

Solution (Python):

import fractions

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

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):
    bigger = max(a, b)
    smaller = min(a, b)
    while smaller:
        bigger, smaller = smaller, bigger % smaller
    return bigger


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


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

Solution (Python):
def gcd(x, y):
    if x < y:
        t = x
        x = y
        y = t
    while x % y != 0:
        t = x
        x = y
        y = t % x
    return y
N = int(input())
T = [int(input()) for i in range(N)]
LCM = T[0]
for i in range(N-1): 
    g = gcd(LCM, T[i+1])
    LCM = (LCM*T[i+1])//g
print(LCM)

Solution (Python):


from fractions import gcd

n=int(input())
l=1
for _ in range(n):
    tmp=int(input())
    l=(tmp*l)//gcd(tmp,l)
print(l)

Solution (Python):
from fractions import gcd
N=int(input())
T=[int(input()) for _ in range(N)]
ans=T[0]
for t in T:
    a=gcd(ans,t)
    ans*=t//a
print(ans)

Solution (Python):
from fractions import gcd
N=int(input())
T=[int(input()) for _ in range(N)]
a=0
ans=T[0]
for t in T:
    a=gcd(a,t)
    ans*=t//a
    a=ans
print(ans)

Solution (Python):

def solve(n):
    t = [int(input()) for _ in range(n)]
    t0 = t[0]
    for t1 in t[1:n]:
        t0 = lcm(t0, t1)
    return t0


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


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


if __name__ == '__main__':
    n = int(input())
    print(solve(n))

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)

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

Solution (Python):
import numpy as np


def get_gcd(a, b):
    a, b = max(a, b), min(a, b)
    c = a % b
    if c == 0:
        return b
    else:
        return get_gcd(b, c)




N = int(input())

arr_T = np.empty(N, dtype = int)
for i in range(N):
    arr_T[i] = int(input())

arr_sort_T = np.sort(arr_T)[::-1]



max_T = np.max(arr_T)
m = max_T
if N != 1:
    
    for n in arr_sort_T[1:]:
        gcd = get_gcd(m, n)
        m = (m // gcd) * n


print(m)

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

Solution (Python):

import fractions
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 ) // fractions.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers)
print(lcm_list(T))

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)

def main():
    n=int(input())
    t=1
    for i in range(n):
        t=lcm(int(input()),t)

    print(t)

main()

Solution (Python):
import fractions
def lcm(x,y):return (x*y)//fractions.gcd(x,y)
pg = 1
for i in range(int(input())):pg=lcm(pg,int(input()))
print(pg)

Solution (Python):


import fractions

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

N = int(input())
T_li = sorted([int(input()) for i in range(N)])
crr_lcm = T_li[0]

for i in range(1, N):
    crr_lcm = lcm(crr_lcm, T_li[i])
print(crr_lcm)

Solution (Python):
from fractions import gcd

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

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

print(ans)

Solution (Python):
from fractions import gcd

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

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

N = I()
print(lcm(*IR(N)))

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

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

Solution (Python):
import fractions


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


N = int(input())
clock = [0] * N
for j in range(N):
    clock[j] = int(input())
gcd = clock[0]

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

print(int(ans))

Solution (Python):
import fractions

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

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

print(LCM[-1])

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):
    t = int(input())
    T.append(t)
    
ans = 1
for i in range(N):
    ans = lcm(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())
T = []
for i in range(N):
    T.append(int(input()))

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

print(ans)

Solution (Python):
n = int(input())
def gcd(a, b):
  if not b:
    return a
  else:
    return gcd(b, a % b)
def lcm(a, b):
  return a * b // gcd(a, b)
ans = 1
for _ in range(n):
  c = int(input())
  ans = lcm(ans, c)
print(ans)

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

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

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


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


def main():
    N = int(input())
    T = []
    for _ in range(N):
        T.append(int(input()))
    t = T[0]
    for i in range(1, N):
        t = lcm(max(t, T[i]), min(t, T[i]))
    print(t)


main()

Solution (Python):


n = int(input())
x = int(input())


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


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


for _ in range(n - 1):
    y = int(input())
    x = lcm(x, y)

print(x)

Solution (Python):

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

def gcd(a,b): 
  if min(a,b) == 0:
    return max(a,b)
  else:
    return gcd(min(a,b),max(a,b)%min(a,b))
    
"""
  mi = min(a,b)
  ma = max(a,b)
  ans = 1
  '''for i in range(2,mi+1):
    if (mi%i)+(ma%i) == 0:
      mi /= i
      ma /= i
      ans *= i
      i -= 1'''
  while True:
    
    if (ma % mi) == 0:
      ans = mi
      break
    else:
      mi = ma%mi
      ma = mi
      
  return ans"""


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

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


lcm_now = 1
for t in t_list:
    lcm_now = lcm(lcm_now, t)
print(lcm_now)

Solution (Python):

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

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
common = n()
for i in range(N-1):
    common = lcm(common, n())

print(common)

Solution (Python):

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


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


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


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

print(tmp_lcm)

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

Solution (Python):



import fractions

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


n = int(input())
alcm = 1

for i in range(n):
    wt = int(input())
    alcm = lcm_fgf(alcm, wt)


print(alcm)

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

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

def main():
    num = int(input())
    ans = int(input())

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

if __name__ == '__main__':
    main()

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

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

N=int(input())
T=[int(input()) for _ in range(N)]
def lcm(a, b):
    return a*b//gcd(a,b)
tmp = T[0]
for t in T[1:]:
    tmp = lcm(tmp, t)
print(tmp)

Solution (Python):

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

def lcm(a,b):
    x = gcd(a,b)
    return a*b//x
"""
from fractions import gcd
def lcm(a,b): 
    return a*b//gcd(a,b)
"""
n = int(input())
t=[]
for i in range(n):
    t.append(int(input()))
ans = 1
for i in range(n):
    ans = lcm(ans,t[i])
print(ans)

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

Solution (Python):
def GCD(a, b):
    if a < b:
        a, b = b, a
    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):
N = int(input())

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

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

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

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

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 fractions as frac
n=int(input())
t=[int(input()) for _ in range(n)]
t=sorted(set(t))
t1=t[0]
if len(t)==1:
    print(t1)
    exit()
for i in range(1,len(t)):
    t2=t[i]
    g=frac.gcd(t1,t2)
    ans=t1*t2//g
    t1=ans
print(int(ans))

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

Solution (Python):
from fractions import gcd as g
def l(a,b):
  x=a*b//g(a,b)
  return x
n=int(input())
m=int(input())
for _ in range(n-1):
  t=int(input())
  m=l(m,t)
print(m)

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())
s =set()

for _ in range(n):
    s.add(int(input()))

ls = list(s)

from fractions import gcd
from functools import reduce
def lcm_base(x, y):
    return (x * y) // gcd(x, y)

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

print(lcm_list(ls))

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

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

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

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

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

ans = time[0]
for i in range(0, n):
    ans = lcm(ans, time[i])

print(ans)

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

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


T1 = int(input())
ans = T1
for i in range(N-1):
    T2 = int(input())
    ans = T1 * T2 //gcd(T1, T2)
    T1 = ans

print (ans)

Solution (Python):

import sys


def solve(N: int, T: "List[int]"):
    def gcd(a, b):
        if b == 0:
            return a
        return gcd(b, a % b)
    ret = T[0]
    for t in T:
        g = gcd(ret, t)
        ret = ret * t // g

    print(ret)
    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):
from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)

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

Solution (Python):
def gcd(a,b):
    if a<b:
        a,b=b,a

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

N=int(input())
for i in range(N):
    if i==0:
        b=int(input())
    else:
        a=int(input())
        c=gcd(a,b)
        b=c*(a//c)*(b//c)

print(b)

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())
ns = []
for _ in range(n):
    ns.append(int(input()))

print(lcm(ns))

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

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

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

def lcmm(l):
  return reduce(lcm, l)

print(lcmm(arr))

Solution (Python):
N = int(input())
a_list = []
for i in range(N):
    a_list.append(int(input()))
    
def gcd(a, b):
    if b > a:
        a, b = b, a
    while b != 0:
        tmp = a % b
        a, b = b, tmp
    return a

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

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

Solution (Python):
N=int(input())
para = [int(input()) for i in range(N)]
para.sort(reverse=True)


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

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

for i in range(N-1,-1,-1):
    if i == N-1:
        p = lcm(para[i-1],para[i])
    else :
        a = max(para[i],p)
        b = min(para[i],p)
        p = lcm(a,b)
print(p)

Solution (Python):
import itertools
import math
def gcd(a,b):
    r = a % b
    if r == 0:
        return b
    return gcd(b,r)

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

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

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

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

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

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

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

Solution (Python):
def euc(x, y):
	if y == 0: return x
	return euc(y, x%y)
N = int(input())
clocks = []
for i in range(0, N):
	clocks.append(int(input()))
ans = clocks[0]
for i in range(1, N):
	ans = ans * clocks[i] // euc(ans, clocks[i])
print(ans)

Solution (Python):
import math

l = input().split()
N = int(l[0])
T = []

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



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

lcm = T[0]
for t in T:
    d = gcd(lcm, t)
    lcm = lcm * t // d

print(lcm)

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)

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

Solution (Python):
import numpy as np

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

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

    print(ans)


def inputList():
    a=list(map(int,input().split()))
    return a


def multisort(li,index):
    return sorted(li,key=lambda x: x[index])

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

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

if(__name__=='__main__'):
    main()

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

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

ans = l[0]

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

print(ans)

Solution (Python):
import fractions

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))
if n>=2:
    ans=t[0]*t[1]//(fractions.gcd(t[0],t[1]))
    for i in range(2,n):
        ans=ans*t[i]//(fractions.gcd(ans,t[i]))
    print(ans)
else:
    print(t[0])

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

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

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

Solution (Python):
from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)

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

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

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

t1=T[0]
for t2 in T[1:]:
	t1=t1*t2//gcd(t1,t2)  

print(t1)

Solution (Python):
from functools import reduce

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

print(reduce(lcm, T))

Solution (Python):

import sys
from fractions import gcd
input = sys.stdin.readline

n = int(input())
arr = list(map(int, [input().rstrip() for _ in range(n)]))
ans = 1
for i in arr:
    ans = ans * i // gcd(ans, i)
print(ans)

Solution (Python):

import fractions as math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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 fractions
n=int(input())
t=[int(input()) for _ in range(n)]
t=sorted(t)[::-1]
x=t.pop()
while(t):
     y=t.pop()
     x=x*y//fractions.gcd(x,y)
     if x>5*10**17:
          break
print(x)

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

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

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

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

print(ans)

Solution (Python):
import fractions
n = int(input())
t = [int(input()) for i in range(n)]
def lcm(x, y):
    return (x * y) //fractions.gcd(x, y)
l = t[0]
for x in range(n):
    l = lcm(l,t[x])
print(l)

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

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

n = int(input())

if n == 1:
	ans = int(input())
else:
	ans = lcd(int(input()),int(input()))

	for i in range(n-2):
		m = int(input())
		ans = lcd(ans,m)
print(ans)