题目描述
ABC School is organising a sporting event. But they don’t know which game they should take up, so that every person can be divided in equally-sized teams with no one left over. Now, the school consists of various classes. You are given an array ‘A’ consisting of strength of these classes. Assuming a game of every possible team size exists and the school want to reduce the number of teams to minimum possible, you need to tell us just the team size.
Input
The first line consists of T: the number of test cases
Each test case starts with a number N: denoting the number of classes in the school.
The next line consists of N space separated natural numbers giving the strength of the ith class.
Output
For each test case, output only one integer, the team-size.
Answer for each test case should be printed in a new line.
Constraints
1 ≤ T ≤ 10000
1 ≤ N ≤ 1000
1 ≤ A[i] ≤ 100000
Example
Input:
3
3
1 2 3
3
4 12 6
2
8 12
Output:
1
2
4
输入格式
见题面
输出格式
见题面