Matrix Product by chocobi(tails)

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

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