What is the class average?
Mr. White 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 (n) questions in every exam and total grade for an exam is 100 points. Thus, every question is 10 (100/n) points. Every question has five multiple choice answers: A, B, C, D, E.
Write a program that reads correct answers, and the answers of n students, and then calculates the class average.
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
Show one floating point number that is the class average.
C E D E C
C E D B A
B E D E C
C E D E C
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