const n = 10;
var
a:array[1..n] of integer;
i,max,count:integer;
begin
randomize;
max:= -maxint;
for i:= 1 to n do begin
a[i]:= random(20);
if a[i] > max then begin
max:= a[i];
count:= 1;
end
else
if a[i] = max then inc(count);
write(a[i],' ');
end;
writeln('max = ',max,' kol-vo povtorenij = ',count);
end.