Average Score
Time limit1sMemory limit128 MB
Replace each of the five scores below 40 with 40 and print their average.
- Level
Easy1 of 10
- Topics
- Array
- Solved
- No attempts yet
Problem
Sanghyun teaches an iPhone app development class with five students: Wonseop, Sehee, Sanggeun, Soong, and Gangsu.
The final exam was yesterday and Sanghyun is grading papers. A score of 40 or more stays as the grade. Below 40, a student must take a makeup session and then receives 40. Makeup is mandatory, so every score under 40 becomes 40.
Given the five scores, write a program that prints the average after this adjustment.
Input
Five lines, the scores of Wonseop, Sehee, Sanggeun, Soong, and Gangsu in order.
Each score is a multiple of 5 between 0 and 100. The average is always an integer.
Output
Print the average score on one line.
Hint
Replace each score below 40 with 40, then divide the sum by 5.