HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Search > problem:


50562 - List of students

Guest
• Discussion of problem (1)

Section problems

• 50458 - Weekly Report
• 50478 - Letter Grades
• 50791 - Mine field
• 50867 - Average of the Best Grades
• 50782 - Max of N integers
• 50460 - Median of 3 Numbers
• 50552 - Casual shoes
• 50558 - Biggest Barn
• 50562 - List of students
• 50566 - Grade Point Average (GPA)
• 50570 - Prime numbers in the seg...
• 50573 - Count and Sum
• 50575 - Number of Prime numbers
• 50576 - Number of Perfect numbers
• 50586 - Prime Palindromes
• 50588 - Processing the list of numbers
• 50589 - The Number of Eggs Sold

Feedback

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

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
Olympiad 2013. Prepared by: Evis Hoxha. Difficulty Alpha

Question 6- List of students

Shqip

Write a program which shows a list of students and their average marks according to the requirements.

Input
There will be given an integer number M (1<=M<=3) and a number N ( 1 < N <=100 ). In the following N lines there will be a string A and a integer B (4<=B<=10), where the string A is the name of the student and B is the average mark of the student.

Output
If M=1: Show all the names of the students and their average marks,who have failed (B=4).
If M=2: Show all the names of the students and their average marks, who are average students (5 <=B <= 8).
If M=3: Show all the names of the students and their average marks, who are good students (9 <=B <= 10).

Input I
1 9
Ada 6
Altin 4
Ana 8
Anisa 10
Besmir 7
Elton 4
Kejsi 9
Matias 6
Nensi 5
Output 1
Altin 4
Elton 4

Input II
3 9
Ada 6
Altin 4
Ana 8
Anisa 10
Besmir 7
Elton 4
Kejsi 9
Matias 6
Nensi 5
Output II
Anisa 10
Kejsi 9

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

www.contester.ru