#B2055. Compute the Mean of a Sample Data Set
Compute the Mean of a Sample Data Set
Compute the Mean of a Sample Data Set
Given a set of sample data, compute the arithmetic mean of the dataset.
The arithmetic mean is defined as: \(\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i\), where \(n\) is the number of samples and \(x_i\) are the sample values.
inputFormat
The first line of input contains an integer \(n\), representing the number of sample data points.
The second line contains \(n\) space-separated numbers.
outputFormat
Output a single line containing the arithmetic mean of the given data, formatted to one decimal place.
sample
5
1 2 3 4 5
3.0