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

Разделы > Linear Data Structures: Arrays > задача:


51175 Question 2

Задачи раздела

• 51111 - Even Numbers
• 51115 - Pascal Triangle
• 51116 - The Star Triangle
• 51043 - Genome Sequencing
• 51042 - The most frequent k-mer
• 51165 Question 1
• 51171 Question 3
• 51175 Question 2
• 51093 - rgb2gray
• 51092 - Even and Odd
• 51095 - Normal and Trace
• 50382 - Parkside's Other Triangle
• 50383 - Noisy Mornings
• 51097 - Sum of Borders
• 51129 - Hexagon
• 51246 - Swap largest word, reverse ...

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs.

Passing the course.

The professor stores all student letter grades in a file, and in the end of the semester he publishes the list of student who have passed the course. Each student have different number of grades in this course. The student can pass the course if his/her average is greater than or equal to 2.0. The student average is calculated as follow:  average=sum of grades / number of grades. If the number of grades is less than 10, the average is calculated over 10.

Students, for each exam, homework and project they have taken, are awarded the following grades in letters by the lecturer of the course.

 Letter Grade  AA  BA  BB  CB  CC  DC  DD  FD  FF  NA
GPA Value  4 3.5 3 2.5 2 1.5 1 0.5 0 0

 

Write the program that prints the list of students who have passed the course and their averages with two digits after the floating point number.

Input Specification:  You will be given the number of students 0<=n<500, then the following n lines contain:

  • Student Name, at most 25 char long
  • Student Surname, at most 25 char long
  • And student letter grades, at most 100 letter grades. Letter grades are separated by space and the line ends with the semicolon “;”.

Output Specification:  Show the name, surname and the average with 2 digits after the floating point of the students who have passed the course.

Sample Input 1
9
name1 surname1 CC BA AA CB FF BB AA BB AA AA  ;
name2 surname2 CB AA CC FF DD CB CB AA AA AA AA BA  ;
name3 surname3 DC CB  FF DD BB CB CC CC DC DC BA BA AA DC DC ;
name4 surname4 BB NA AA DC FF BB CC CC CC ;
name5 surname5 NA BB AA NA NA NA NA NA NA NA NA NA ;
name6 surname6 CB AA BB CC DC BA CB BA NA CC  ;
name7 surname7 AA AA AA AA AA  ;
name8 surname8 FF CC CC BB CC BA BA BB  ;
name9 surname9 AA AA AA AA ;
Sample Output 1
name1 surname1 3.00
name2 surname2 2.83
name3 surname3 2.10
name6 surname6 2.45
name7 surname7 2.00

 

 

 

 

 

 

 

 

 

 

 

.

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

www.contester.ru