var tmp, max, min, sum, count : longint; begin count := 0; read(tmp); if tmp = 0 then exit; max := tmp; min := tmp; sum := tmp; inc(count); while tmp <> 0 do begin read(tmp); if tmp <> 0 then begin inc(sum, tmp); inc(count); if tmp > max then max := tmp; if tmp < min then min := tmp; end; end; writeln(max, ',', min, ',', sum div count); end.
输入: 1 2 3 4 5 6 0 7
输出:1