import math
def lcm(x,y):
x=int(x)
y=int(y)
return xxxx
def main():
n=int(input())
if(n<=2):
x,y=map(int,input().split())
print(int(lcm(x,y)))
elif(n==0):return
else:
arry=list(map(int,input().split()))
Sum=lcm(arry[0],arry[1])
for i in range(2,len(arry)):
Sum=lcm(Sum,arry[i])
print(int(Sum))
while(1):
try:
main()
except:
break
xxx自己補
import math
def lcm(x,y):
x=int(x)
y=int(y)
return xxxx
def main():
n=int(input())
if(n<=2):
x,y=map(int,input().split())
print(int(lcm(x,y)))
elif(n==0):return
else:
arry=list(map(int,input().split()))
Sum=lcm(arry[0],arry[1])
for i in range(2,len(arry)):
Sum=lcm(Sum,arry[i])
print(int(Sum))while(1):
try:
main()
except:
break
xxx自己補
why don't u use stackoverflow