Program gt;
var a:array[1..10,1..10]of integer;
n,k,p:integer;
begin
p:=0;
for n:=1 to 10 do
for k:=1 to 10 do
a[n,k]:=1;
for n:=1 to 4 do
for k:=1 to n+1 do
begin
A[n,k]:=A[n,k]-1;
A[k,n]:=A[k,n]-1;
end;
for n:=1 to 10 do
begin
for k:=1 to 10 do
begin
write(a[n,k]:3,' ');
if(a[n,k]=0)then p:=p+1;
end;
writeln;
end;
writeln(p);
end.
ответ:8