Matrix Product by McBusLuck

c=''
while''==c:
 c=1;z=[];y=[]
 while c:
  try:c=raw_input()
  except:c=0
  if c:d,e=c.split('  ');z.append(map(int,d.split()));y.append(map(int,e.split()))
 for i in z:print' '.join(`sum(s*t for s,t in zip(i,j))`for j in list(zip(*y)))
 print

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