Matrix Product by chocobi

a[999],i,k,s;main(c){for(s=i=0;i<s*s*2|!s;s=33/k+s?s:i)if(scanf("%d%[ ]",&a[i++],&k)<0)return;for(i=0;i<s*s;printf(" %d"+!(i%s),c),++i%s||puts(""))for(c=k=0;k<s;++k)c+=a[i/s*s*2+k]*a[k*s*2+s+i%s];main(puts());}

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page