program a_1;
var x:array[1..20] of integer;
n,i,max,nr:integer;
begin
repeat
write('n='); readln(n);
until(n>=1) and (n<=20);
for i:=1 to n do
begin
write('x[',i,']=');
readln(x[i]);
end;
max:=x[1];
for i:=2 to n do
begin
if (x[i]>max) then
max:=x[i]
end;
for i:=1 to n do
if (x[i]=max) then
nr:=nr+1;
write('Maximul=',max,' el repetandu-se de ',nr,' ori')
readln
end.
Bafta la scoala!