编程介的小学生 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 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题