Average

The company has n employees. Each employee gets a salary. The company is interested in their expenses and would like to understand what’s the average amount they’re spending per employee. They ask you to write a program that would provide them with that data.
It is guaranteed that the number of employees is 5 ≤ n ≤ 8.
The first line of the input contains the number of employees n. The next n lines contain their salaries as integers.
The program should print a single number - the average of the salaries.
Input
Output
5 100 200 150 180 400
206
Tip
You can read 5 inputs and then use an if statement to determine if reading more input is necessary and append it if more lines are present.
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue