题目: Problem - 1019 (hdu.edu.cn)
#include<bits/stdc++.h>
using namespace std;
int gcd(int x,int y){return y ? gcd(y,x%y) : x;
}
int lcm(int x,int y){return x/gcd(x,y)*y;
}
int main(){int T,a,b,ans;cin>>T;while(T--){ans=1;cin>>a;while(a--){cin>>b;ans=lcm(ans,b);}cout<<ans<<endl;}return 0;
}