inverse matrix by 51b

double*y[9],*z,x[9][18],t;i,j,k;main(){for(;i<81;scanf("%lf",(y[i/9]=x[i/9])+i++%9))x[i/9][i/9+9]=1;for(i=0;i<9;i++){i-2||(z=y[i],y[i]=y[4],y[4]=z);t=y[i][i];for(j=0;j<18;)y[i][j++]/=t;for(j=0;j<9;j++)for(t=y[j][i],k=0;i-j&&k<18;k++)y[j][k]-=t*y[i][k];}for(i=0;i<81;i++)printf("%.f%c",y[i/9][i%9+9]+.1,i%9-8?32:10);}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page