BETA

Submissions : 1303 Accuracy :

32.08

LCM of given array elements
     

Given an array A[ ] of N numbers, your task is to find LCM of it.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow . The first line of each test case contains an integer N denoting the number of array elements. The next line contains N space separated values of  array A[ ] .

Output:
For each test case in a new line print the lcm of the elements of the array .

Constraints:
1<=T<=100
1<=N<=20
1<=A[ ] <=20

Example:
Input

1
4
1 2 8 3

Output
24

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.