HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > BINF - CEN111 HW1 > problem:


3. 51057 - Number of students

Guest
• Review clarifications (2)

Volume problems

• 1. 51055 - The competition
• 2. 51056 - Welcome Picnic
• 3. 51057 - Number of students
• 4. 51058 - Third grade students
• 5. 51059 - Football teams
• 6. 51060 - Public Transportation

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Ibrahim Mesecan.

Q4

Question: One of your professors needs assistance. He wants to write a program to calculate the average of students and to count the number of students whose average is above (<) a given grade (k). The professor calculates the averages as follows, 65 percent of the highest grade and 35 percent of the lowest grade. Every student has at most 10 grades where the grades are integers between 30 and 100. The max grade is calculated as regular: max of the given grades. On the other hand, to calculate the min regularly, the student must have at least 6 grades. If a student has less than 6 grades, his min is taken as 0.

Input specification: You will be given two integers in the beginning: The number of students (n) and the grade (k) above which you are going to count the number of students. The following n lines will have at most 10 integers (integers between 30 and 100) separated by a comma where the last grade is followed by a semicolon. n is an integer 1 and 10,000 and k is between 1 and 100.

Output specification: Show one integer.

Sample Input
6 75
67,63,98,93,98,36,60;
51,91,96,44,54,40,80,49,61;
79,62,89,96,37,53,43,71,74;
44,60,41,35;
85,71,35,45,89,52,40,50,48,57;
46,61,71,48,54,31,92;
Sample Output
3

Explanation: The first student has seven grades where his min is 36 and his max is 98. Thus his average will be 76.3. The table on the right gives the information about average calculation for each student.



Для отправки решений необходимо выполнить вход.

www.contester.ru