Given an array of N positive integers. Your task is to find the GCD of all numbers of the array.
First line of input contains number of test cases T. First line of test case contains a positive integer N, size of the array. Next line contains the array elements.
For each testcase, print the GCD of array elements.
1 <= T <= 100
1 <= N <= 106
1 <= Arr[i] <= 106
Testcase 1: For array elements 5,10 GCD will be 5.
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.