1)
Var a:array[1..10000] of longint;n,i,min,max:longint;
Begin
readln(n);
for i:=1 to n do
read(a[i]);
max:=a[1];
min:=a[1];
for i:=2 to n do
begin
if (a[i]>max) then max:=a[i];
if (a[i]end;
writeln(max-min);
End.
2)
Var a:array[1..10000] of longint;
Begin
readln(n);
for i:=1 to n do
read(a[i]);
for i:=1 to n do
if (a[i]>5) then write(a[i],' ');
writeln;
End.
3)
Var a:array[1..10000] of longint;i,n:longint;
Begin
readln(n);
for i:=1 to n do
read(a[i]);
writeln(0);
End.