who is the best?

Problem Description
There are N people want to choose the best person. Each person select the best person ai, .John wants to know that who received the most number of votes.

Input
The first line contains a single integer T(1≤T≤50),indicating the number of test cases.
Each test case begins with an integer N(1≤N≤100),indicating the number of person.
Next N lines contains an integer ai(1≤ai≤N).

Output
For each case, output an integer means who is the best person. If there are multiple answers, print the minimum index.

Sample Input
2
10
1
2
3
4
5
6
7
8
9
10
5
3
3
3
3
3

Sample Output
1
3

2个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐