Program HOC24;
Uses crt;
var a: array[1..1000] of integer;
min,max,i,n: integer;
t: longint;
Begin
clrscr;
write('Nhap so phan tu: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
end;
max:=a[1]; min:=a[1];
for i:=1 to n do
begin
if a[i] > max then max:=a[i];
if a[i]<min then min:=a[i];
t:=t+a[i];
end;
writeln('Phan tu lon nhat cua day la: ',max);
writeln('Phan tu be nhat cua day la: ',min);
write('Tong cac phan tu cua day la: ',t);
Readln;
End.