5
12
4
6
8
2
代码如下:模拟。。
var
a:array[0..500]of real;
n,i,j:longint;
z,p:real;
begin
assign(input,'stats.in');reset(input);
assign(output,'stats.out');rewrite(output);
readln(n);
for i:=1 to n do
begin
readln(a[i]);
p:=p+a[i];
end;
for i:=1 to n do
for j:=1 to n do
if a[i]<a[j] then begin a[0]:=a[i]; a[i]:=a[j]; a[j]:=a[0]; end;
if n mod 2=0 then z:=(a[(n div 2)+1]+a[n div 2])/2
else z:=a[(n div 2)+1];
p:=p/n;
writeln(p:0:6);
writeln(z:0:6);
close(input); close(output);
end.