ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > CEN109/111_2016_Questions > задача:


hw3. 51057 - Number of students

CEN109/111_2016_Questions

Старт: 07.дек.2016 в 12:37:00
Финиш: 07.дек.2016 в 13:42:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (2)

Задачи турнира

• 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

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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