题目: |
program xx2011_1;
var n,i,c:longint;ave,s:extended;
f:array[1..10000]of longint;
begin
read(n);ave:=0;
for i:=1 to n do begin
read(f[i]);
ave:=ave+f[i];
end;
ave:=ave/n;c:=0;
for i:=1 to n do
if f[i]<ave then c:=c+1;
writeln(ave:0:2,' ',c);
end.
输入:
5
73 76 83 91 77 输出:80.00 3
|