#Z15113. 白细胞计数

白细胞计数

Description

A hospital collected n samples of white blood cell counts during the treatment of a clinical case to analyze the therapeutic effect of a new antibiotic. To reduce analytical errors, one sample with the highest value and one sample with the lowest value must be removed from the n samples. The average of the remaining n-2 valid samples is then used as the analytical indicator. Additionally, to observe the stability of the antibiotic's efficacy, the error of this average must also be provided, which is the maximum absolute difference between all valid samples (i.e., excluding the two removed samples) and this average. Now, please write a program to calculate the average white blood cell count and the corresponding error based on the provided n sample values.

Input Format

The first line of input is a positive integer n (2 < n ≤ 300), indicating that there are n samples. The following n lines each contain a floating-point number representing the corresponding white blood cell count, with units of 109/L10^9/L. The numbers are separated by spaces.

Output Format

The output consists of two floating-point numbers, separated by a space. These are the average white blood cell count and the corresponding error, also in units of 109/L10^9/L. The results should be rounded to two decimal places.

5
12.0
13.0
11.0
9.0
10.0

11.00 1.00