Start: Nov, 12, 2017 10:00:00
2017秋Python程序设计基础培训第三次作业
End: Nov, 19, 2017 12:00:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 115ms
Memory: 24300kB
Author: shanzhenyu
In contest: 1123

while True:
    try:
        n,m,k = list(map(int,input().split()))
        a,b,c = [],[],[]
        for i in range(n):
            a.append(list(map(int,input().split())))
           
        for j in range(m):
            b.append(list(map(int,input().split())))
         
        for i in range(n):
            
            for o in range(k):
                tmp = 0
                for j in range(m):
                    tmp += a[i][j]*b[j][o]
                c.append(tmp)
                
        for i in range(n*k):
            if i!=0 and (i+1)%k == 0:
                print(c[i])
            else:
                print(c[i],end= ' ')
                    
    except EOFError:
        break