Const n=10; m=3;
var
a:array[1..n,1..m] of integer;
i,j,s,k:integer; p:real;
begin
Randomize;
writeln('Исходный массив:');
for i:=1 to n do
begin
for j:=1 to m do
begin
a[i,j]:=random(81)+20;
write(a[i,j]:4);
end;
writeln;
end;
s:=0;
for i:=1 to n do
for j:=1 to m do s:=s+a[i,j];
p:=s/n*0.8;
writeln('p = ',p:5:2);
writeln('Зачислены:');
k:=0;
for i:=1 to n do
begin
s:=0;
for j:=1 to m do s:=s+a[i,j];
if s>=p then begin write(i,' '); k:=k+1; end;
end;
writeln;
writeln('k = ',k);
end.