program andrey1; var dat,sol:text; a,b:array[1..20,1..20] of real; i,j,n:integer; sum:real; begin assign(dat,'matrix.dat'); reset(dat); assign(sol,'matrix.sol'); reset(sol); rewrite(sol); read(dat,n); for i:=1 to n do for j:=1 to n do read(dat,a[i][j]); b:=a; for i:=1 to n do for j:=1 to n do sum:=sum+a[i][j]; for i:=1 to n do for j:=1 to n do begin if i<>j then begin if ji then b[i,j]:=sum-a[i,j]; end; end; for i:=1 to n do begin writeln(sol); for j:=1 to n do write(sol,' ',b[i,j]:3:2); end; close(dat); close(sol); end.