Drinks

Practice this coding question on Coding Gurukul.

Problem statement

A food-science class mixes equal volumes of several fruit drinks into a single container. Each drink has a labelled percentage of fruit juice, and the remaining volume is water. Since the contribution from every drink is the same volume, the teacher asks for the fruit percentage in the finished mixture. No liquid is lost and the volumes combine without contraction. Your task Given n percentage values, compute the percentage of fruit juice after mixing one equal-volume portion of every drink. Print the arithmetic mean of the percentages, formatted with exactly six digits after the decimal point. This exercise uses a fixed output format so the local judge can compare answers consistently. Important details Do not truncate using integer division. A drink with zero percent or one hundred percent is valid. The result is a percentage from 0 to 100, not a fraction from 0 to 1. Worked example Mixing equal portions at 20%, 40% and 90% gives (20 + 40 + 90) / 3 = 50%. Print 50.000000.

Input format

First line: n. Second line: n integer percentages.

Output format

Print the mean percentage with exactly six decimal places.

Constraints

1 <= n <= 100; each percentage is 0..100.

Sample input

3
20 40 90

Sample output

50.000000

Sign in to run or submit a solution in C++, Java or Python.