HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Search > problem:


50562 - List of students

Guest
• Discussion of problem (1)

Section problems

• 50588 - Processing the list of numbers
• 50547 - Close Pair
• 50238 - The smallest number
• 50437 - Age Labeling
• 50457 - The Number of Winners
• 50478 - Letter Grades
• 50782 - Max of N integers
• 50552 - Casual shoes
• 50562 - List of students
• 50570 - Prime numbers in the seg...
• 50586 - Prime Palindromes
• 50783 - The smallest number
• Raporti Javor
• 50331 - Number of Numbers over A...
• 50465 - How many students have p...
• 50450 - Last Appereance of a Number
• 50378 - Sum of the given digits

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