inverse matrix by 51b

import std.stdio;real[18][10]x;int i,j;void main(){for(;~scanf("%Lf",&x[i/9][i%9]);i++)x[i/9][i%9+9]=i%10<1;x[6][]+=x[0][];for(i=9;i--;)for(x[i][]/=x[i][i],j=9;j--;)i-j&&(x[j][]-=x[j][i]*x[i][]);for(i=0;i<81;i++)writef("%.f",x[i/9][i%9+9]+.1,"
 "[i%9<8]);}

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

download

return to the top page