#CCBCHBAHAI0000092. Sai lệch tuyệt đối trung bình
Sai lệch tuyệt đối trung bình
Mean Absolute Deviation
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given integer observations , let
and define the mean absolute deviation
Print with exactly 6 digits after the decimal point.
Input
The first line contains . The second line contains integers .
Output
Print with exactly 6 digits after the decimal point.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
4
1 2 7 10
Output
3.500000
Explanation
The result follows directly from the mathematical definition above.