Shinchan's Ribbon

0

0 votes
Easy
Problem

It is Shiro's birthday and Shinchan is decorating the house with Ribbons. His Mom Misty wants to have some Ribbons of specified lengths only. Shinchan went to the shop to buy ribbons. But being a mischief, he bought all ribbons of same length. His Mom Misty has no other option apart from joining the ribbons to form the specified length ribbons. She is not allowed to cut the ribbons. Consider that Shinchan has bought sufficient amount of ribbons. Can you tell what is the maximum length of Ribbons that Shinchan can buy so that all the required length ribbons can be formed?

Input
First line contains T denoting the number of test cases.
First line of each test case contains a single integer N denoting the total no of ribbons required.
Second line of each test case contains N integers (A1...An) denoting the length of ith ribbon.

Output
For each test case print a single integer as answer each in a new line.

Constrains
T<=100
N<=100
Ai<=100

Problem Setter
Shikhar Kunal

Sample Input
3
5
2 4 6 8 10
3
3 6 12
5
4 6 12 10 24
Sample Output
2
3
2
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Sample 2
Shinchan can buy the Ribbons of length 3. Misty can join 2 ribbons to form the ribbon of length 6 and 4 ribbons to form the ribbon of length 12.

Editor Image

?