Program HOC24;
var min,j,i,n,tg: integer;
t: longint;
a: array[1..1000] of integer;
begin
write('Nhap n: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
end;
t:=0;
for i:=1 to n do if a[i] mod 2=0 then write(a[i],' ') else t:=t+a[i];
writeln; writeln('Tong cac so le la: ',t);
min:=a[1];
for i:=2 to n do if a[i]<min then min:=a[i];
writeln('So nhat nhat la: ',min);
for i:=1 to n do
for j:=i to n do
if a[i]>a[j] then
begin
tg:=a[i];
a[i]:=a[j];
a[j]:=tg;
end;
for i:=1 to n do write(a[i],' ');
readln
end.
Uses crt;
var i,n,min,k,e,j: longint
a: array[1..100] of longint;
begin clrscr;
readln(n);
for i:=1 to n do read(n); readln;
for i:=1 to n do if(a[i] mod 2=0) then write(a[i],' ');
for i:=1 to n do if(a[i] mod 2<>0) then k:=k+a[i];
min:=a[i];
for i:=1 to n do if(min>a[i]) then min:=a[i];
writeln(min);
for i:=1 to n-1 do
for j:=i+1 to n do if a[j] <=a[i] then
begin e:= a[i];
a[i]:=a[j];
a[j]:=e; end;
for i:=1 to n do write(a[i],'');
readln;
end.