(http://acm.hdu.edu.cn/showproblem.php?pid=1019)
#include<stdio.h>
int gcd(int a,int b)
{
return b?gcd(b,a%b):a;
}
int main()
{
int T,n,x,temp;
scanf("%d",&T);
while(T--)
{
scanf("%d %d",&n,&temp);
for(int i=1;i<n;++i)
{
scanf("%d",&x);
temp=temp/gcd(temp,x)*x;
}
printf("%d\n",temp);
}
return 0;
}