ZipRecruiterOA #3
Coderwriting
估计简单可在线判题
You are given student grades; each student appears at least once, and grades are 1 to 5. Find the student with the highest average grade; different students have different averages.
输入格式
The first line contains n (1..100000), followed by n lines, each with a name (English letters, no spaces, case-sensitive) and a grade (1..5).
输出格式
Output the name of the student with the highest average grade.
样例 1
输入:
5
John 5
Michael 4
Ruby 2
Ruby 5
Michael 5
输出:
John
样例 2
输入:
6
Kate 5
Kate 5
Maria 2
John 5
Michael 4
John 4
输出:
Kate
样例 3
输入:
5
A 5
A 5
B 4
B 4
B 4
输出:
A