编程介的小学生 2017-07-29 19:03 采纳率: 20.5%
浏览 726
已采纳

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条回答

  • threenewbee 2017-07-31 15:36
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突