HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Array and Matrices > problem:


50337 - Exam Averages

Guest
• Review clarifications (2)

Volume problems

• 120. 50331 - Number of Numbers o...
• 155. 50726 - Pascal Triangle - 1
• 180. 50755- Top N Donors - 1
• 190. 50734 - Product Info (In Srt)
• 200. 50290 - Minimax Sum
• 50332 - Variance of a series
• 50687 - Pascal Triangle - 2
• 50342 - 100 Factorial
• 50337 - Exam Averages
• 51149 - One Piece Arena
• 50558 - Biggest Barn
• 50567 - Input Data Normalization
• 50768 - Where is Waldorf?
• 151. 50557 - nth Power of m (Long...
• 160. 50301 - Fractions to Decimals
• 165. 50360 - National Elections
• 170. 50319 - Toll Plazas

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.

Exam Averages

Mr. Hoxha works as assistant director at South Tirana High School. He stores all exams results for his responsible classes in a file. Time to time, he wants to see these exam averages. Write a program that is going to read all data and then calculate and show exam averages.

Input specification
There will be n students and m exams where 1 ≤ n ≤ 10000 and 1 ≤ m ≤ 50. The following n lines contain m integer exam marks for students. Every mark can be an integer 0 ≤ m ≤ 100. Any mark between 1 and 100 is a grade what student has taken from that exam. And, 0 means the student hasn't taken the exam because of a problem, and thus, it will not be count in the exam average.

Output specification
Show m (space separated) double precision numbers that represent exam averages.

      

  Sample Input:
  3 4
  0  0 100 10
  77 0 1 85
  30 80 100 10  

  Sample Output:
  53.5 80 67 35   

Output explanation

      
  Student Nr. Exam 1 Exam 2 Exam 3 Exam 4
1
0
0
100
10
2
77
0
1
85
3
30
80
100
10
Exam Averages
53.5
80
67
35


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

www.contester.ru