HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


155. 50334 - What is the class average?

Guest
• Discussion of problem (1)

Volume problems

• 100. 50330 - Find the average of n ...
• 110. 50359 - Mode of a Series
• 120. 50331 - Number of Numbers o...
• 120. 50329 - Draw Matrix-1
• 125. 50538 - Sum of kth Diagonal
• 140. 50599 - Sum of Squared Error ...
• 15-SprPrE1-80. 50741 - DNA Distance
• 151. 50557 - nth Power of m (Long...
• 155. 50334 - What is the class ...
• 155. 50726 - Pascal Triangle - 1
• 160. 50301 - Fractions to Decimals
• 165. 50360 - National Elections
• 170. 50319 - Toll Plazas
• 180. 50755- Top N Donors - 1
• 185. 50784 - Top Growing Company
• 190. 50734 - Product Info (In Srt)
• 200. 50290 - Minimax Sum

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.
Prepared by Ibrahim Mesecan.

What is the class average?

Mr. Hoxha has prepared a multiple choice exam system. He uses an optical reader machine to get the answers from answer sheets to a text file. Then, he wants another program to check for the number of correct answers and to calculate the student grades.

He usually asks 10 (m) questions in every exam and total grade for an exam is 100 points. Thus, every question is 10 (100/m) points. Every question has five multiple choice answers: A, B, C, D, E.

Question:
Write a program that reads correct answers, and the answers of n students, and then calculates the class average.

Input specification
At the beginning, you will be given two numbers (n and m). Next line contains m space separated letters which are the correct answers of the exam. The following n lines contain the answers of n students. The student answers can be A, B, C, D, E and where 1 ≤ n ≤ 100 and 1 ≤ m ≤ 40

Output specification
Show one floating point number that is the class average.

      

  Sample Input:
3 5
C E D E C
C E D B A
B E D E C
C E D E C

  Sample Output:
  80.0

 Output Explanation :
There are 3 students and 5 questions in the exam. Thus, every correct answer is 20 points.

Student Nr.    Nr. of correct answers   The student grade
1
3
60
2
4
80
3
5
100

 

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

www.contester.ru