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

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


RE1. 51077 - Grades Histogram

CEN109/111_2016_Questions

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

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

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

• PE05. 51031 - Convert from Hex to...
• PE06. 51032 - Triangle Property
• 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.

Grades Histogram

A professor stores his two exam results in a file (Midterm and Final exams). At the end of the semester, first he calculates student averages: 40% of midterm and 60% of final rounded to the nearest integer. Then, to be able to analyze exam results better, he prepares the grade histogram. In his histogram, he counts the number of grades within 4 grade-ranges:

  • Grades between 0 and 49
  • Grades between 50 and 69
  • Grades between 70 and 84
  • Grades between 85 and 100

Question: Write a program that is going to read grades for n students. And print the grades histogram.

Input specification: You will be first given an integer (n where n is between 1 and 2000): the number of students. Then, you will be given n lines of information. Each line contains two integer numbers between 0 and 100 separated by a space.

Output specification: Show 4 integers: the number of grades in the ranges given above.

Sample Input Sample Output
6
64 50
82 78
79 86
56 48
95 78
45 59
0 3 2 1

Explanation: There are 6 students. So, there is no student in the first range (0-49). There are 3 students in the second range (50-69).

Student   Average  
1 56
2 80
3 83
4 51
5 85
6 53


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

www.contester.ru