var n,mn,mx,count,i,sp: integer; f: text; begin mn:=300; mx:=1; count:=0; assign(f,'input.txt'); reset(f); readln(f,n); for i:=1 to n do begin readln(f,sp); if spmx then mx:=sp; if sp<=30 then count:=count+1; end; close(f); { вывод в файл } assign(f,'output.txt'); rewrite(f); writeln(f,mx-mn); writeln(f,count); close(f); end.