Program Hotboy ;
Uses crt;
var duong,h,l,dem,x,i,j,n,Ki:integer;
am,tb1,tb2: real;
A,B: array [1..100] of integer;
begin
clrscr;
write('Nhap so phan tu trong day :');readln(n);
for i:=1 to n do
Begin
write('A[',i,']=');readln(A[i]);
End;
B[i]:=0;
For i:=1 to n do
for j:=i to n do
begin
if A[i]=B[j]then B[j]:=B[j] +1;
Ki:=B[1];
For i:=1 to n do if B[i]>Ki then Ki:=B[i];
end;
begin
if Ki=B[i]then write('so ',A[i],'xuat hien nhieu nhat');
end;
Dem:=0;
For i:=1 to n do
begin
x:=trunc(sqrt(a[i]));
if sqr(x)=a[i] then dem:=dem+1;
End;
Writeln('co',dem,'so chinh phuong trong day');
am:=0; duong:=0; h:=0; l:=0; tb1:=0; tb2:=0;
For i:= 1 to n do
If A[i] <0 then
Begin
Am:=am+A[i];
h:=h+1;
Tb1:=am/h;
End;
for i:=1 to n do
begin
If A[i] < 0 then
Duong:=duong+A[i];
l:=l+1;
Tb2:=duong/l;
end;
Write('trung binh cong so am la',tb1);
Write('trung binh cong cac so duong la',tb2);
Readln
End.