#C5897. Average Marks Calculation
Average Marks Calculation
Average Marks Calculation
You are given the information of (n) students. The first line of input contains an integer (n \geq 0). Each of the following (n) lines contains a student's name followed by their marks in various subjects (all separated by spaces). Your task is to compute the average marks for each student, rounded to one decimal place, and then output the students in descending order of their average marks. In case of ties in the average marks, sort the students in alphabetical order of their names.
inputFormat
The first line contains a single integer (n) representing the number of students. Each of the next (n) lines contains a student's name and their marks in various subjects separated by spaces.
outputFormat
For each student, print a line with the student's name and their average marks rounded to one decimal place. The output should be sorted in descending order by average marks, and if there is a tie, sorted in alphabetical order by name.## sample
4
Alice 91 85 74
Bob 88 76 92
Charlie 70 60
David 88 88 88
David 88.0
Bob 85.3
Alice 83.3
Charlie 65.0
</p>