Given an array A[ ] of N numbers, your task is to find LCM of it.
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[ ] .
For each test case in a new line print the lcm of the elements of the array .
1<=A[ ] <=20
1 2 8 3
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.