![img](https://img-mid.csdnimg.cn/release/static/image/mid/ask/889943457566
题主用一个数组来存每个人的票数,定义一个max,每次存票数时,就比较一下,用来记录最大的票数,让后遍历就行了