-->
当前位置:首页 > 题库

PROGRAMMING:Find the student with the highest total score

Luz5年前 (2021-05-10)题库461
Given the basic information of n students, including student number (a string composed of 5 digits), name (a non empty string less than 10 in length that does not contain white space characters) and scores of 3 courses ([0100] integer), the name, student number and total score of the student with the highest total score are required to be output.
###Input format:
Enter a positive integer n ($$$Le $$10) on one line. Then n lines, each line gives a student's information, the format is "student name grade 1 grade 2 grade 3", separated by a space.
###Output format:
Output the name, student number and total score of the student with the highest total score in one line, with a space between them. The title guarantees that such a student is the only one.
###Input example:
```in
five
00001 huanglan 78 83 75
00002 wanghai 76 80 77
00003 shenqiang 87 83 76
10001 zhangfeng 92 88 78
21987 zhangmeng 80 82 75
```
###Output example:
```out
zhangfeng 10001 258
```






answer:If there is no answer, please comment