HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Albanian National Olympiads in Informatics > problem:


2013-6. 50562 - List of students

Guest
• Discussion of problem (1)

Volume problems

• 2012-2. 50545 - Diet
• 2012-3. 50721 - Palindrome
• 2012-4. 50680 - Triangle
• 2012-5. 50551 - Camelot
• 2013-1. 50591 - Leap year
• 2013-3. 50570 - Prime numbers in t...
• 2013-4. 50958 - ATM
• 2013-5. 50543 - Hotel rooms
• 2013-6. 50562 - List of students
• 2014-2. 50738 - Median value
• 2015-2. 50489 - Football Championship

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