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

PROGRAMMING:Assign supplementary question set 1

Luz5年前 (2021-05-10)题库459
Before the final examination, C language organized a test, counted the score of each student (integer), and calculated the average score of the whole class ave (integer). Four supplementary question sets were created, numbered 1, 2, 3 and 4 respectively, and the number of questions decreased in turn. According to the test scores, the student list of each question set is assigned. The test scores are in the range of [ave + 10100], [ave, ave + 10], [ave-10, ave], [0, ave-10) corresponding to question set 1, 2, 3 and 4 respectively. Please program to help the teacher realize the assignment of problem set.
###Input format:
The input gives a positive integer n (≤ 10) on one line.
Then n lines, each line gives a student's information, the format is "student name test results", separated by a space. Among them, the student number is a string composed of 12 digits, the name is a non empty string with a length less than 20 and does not contain white space characters, and the test score is an integer in the [0100] range.
###Output format:
First, output the average score (integer) of all students' test scores in one line, then output the number of students whose test scores are higher than the average score in the next line, and then output the student number, name, test scores and assigned question set number of a student whose test scores are higher than the average score in each line according to the input order, with a space between them.
###Input example:
```in
three
201410300106 wanyun 70
201618050322 zhangyu 59
201509210118 lixiao 80
```
###Output example:
```out
sixty-nine
two
201410300106 wanyun 70 2
201509210118 lixiao 80 1
```







answer:If there is no answer, please comment