HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN109/111_2016_Questions > problem:


hw3. 51057 - Number of students

CEN109/111_2016_Questions

Start: Dec.07.2016 at 12:37:00 PM
Finish: Dec.07.2016 at 01:42:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (2)

Contest problems

• PE07. 51033 - Sum of the series
• PE08. 51034 - Area of 3 Shapes
• PE09. 51040 - Annual profit
• PE10. 51041 - Plane Segmentation
• PE11. 51038 - Simple interest
• PE12. 51039 - Automated billing system
• RE1. 51077 - Grades Histogram
• RE2. 51078 - Max trade
• hw3. 51057 - Number of students
• hw4. 51058 - Third grade students
• hw5. 51059 - Football teams
• hw6. 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