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

PROGRAMMING:Statistical results (Cixi primary school, 2012)

Luz5年前 (2021-05-10)题库434
After every exam or test, teachers have to make statistics of their scores. If there are three courses of Chinese, mathematics and English in a final exam, please program to output the highest score of the total score and the highest score of each subject.
###Input format:
Enter a total of N + 1 lines.
The first line is a positive integer n (1 ≤ n ≤ 100), representing the number of students, numbered from 1 to n.
Next, N lines, 3 integers in each line, which represent each student's Chinese, mathematics and English scores in turn (the scores of each course are integers between 0 and 100, including 0 and 100).
###Output format:
The output consists of 1 line and 4 integers, which respectively indicate the highest score of three subjects, Chinese, mathematics and English.
###Input example:
```in
three
80 67 96
88 71 93
90 95 80
```
###Output example:
```out
265 90 95 96
```
[example explanation]
Input three student scores, the first student's scores of Chinese, mathematics and English are 80, 67 and 96 respectively, the second student's scores of Chinese, mathematics and English are 88, 71 and 93 respectively, and the third student's scores of Chinese, mathematics and English are 90, 95 and 80 respectively. The third student had the highest total score of 265. The highest score of Chinese is 90, mathematics 95 and English 96.
[data range agreement]
All input data should be 1 ≤ n ≤ 100, and the score should be between 0 and 100 (including 0 and 100).







answer:If there is no answer, please comment