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

PROGRAMMING:Statistics of final results

Luz5年前 (2021-05-10)题库451
The final plan of course selection in programming school is arranged in the afternoon of Friday in the 15th week. Some students report that the weekend of the 15th week coincides with the Dragon Boat Festival holiday and have asked for leave to go home early.
After negotiation, the final examination of the course will be held twice, on Friday afternoon of the 15th week and Friday afternoon of the 16th week.
If the students take both exams, the final score of the course will be the highest. If you only take part in one time, the result is the final examination result.
Please help the teacher to count the final scores of each student.
###Input format:
The input gives a positive integer n (≤ 10) on one line.
Then n lines, each line gives a student's information in the format of "student number name, first grade, second grade", separated by a space.
The student number is a string composed of 15 digits, and the name is a non empty string that does not contain white space characters and does not exceed 20 in length,
The score is an integer in the range of [0100]. If you do not take the exam, the score is 0.
###Output format:
According to the increasing order of student number, each line outputs a student's student number, name and final score, with a space between them.
###Input example:
```in
three
201410300106 wanyun 70 88
201618050322 zhangyu 90 0
201509210118 lixiao 0 0
```
###Output example:
```out
201410300106 wanyun 88
201509210118 lixiao 0
201618050322 zhangyu 90
```







answer:If there is no answer, please comment