#P313. 【例53.2】 白细胞计数
【例53.2】 白细胞计数
Description
A hospital has collected n samples of white blood cell counts during the treatment of a clinical case to analyze the effectiveness of a new antibiotic. To reduce analysis error, one sample with the maximum value and one with the minimum value are removed from these samples, and the average of the remaining valid samples is used as the analysis indicator. Additionally, to observe whether the antibiotic's efficacy is stable, the error of this average value needs to be calculated, which is the maximum absolute difference between all valid samples (excluding the two removed samples) and the average value.
Now, please write a program to calculate the average white blood cell count and its corresponding error based on the provided sample values.
Input Format
The first line of input is a positive integer (), indicating there are samples.
The following lines each contain a floating-point number representing the white blood cell count, with units of /L. Numbers are separated by spaces.
Output Format
Output two floating-point numbers separated by a space. These are the average white blood cell count and its corresponding error, also in units of /L. Results should be rounded to 2 decimal places.
Sample
5
12.0
13.0
11.0
9.0
10.011.00 1.00