Start: Jul, 17, 2019 00:00:00
20190717Python程序设计基础培训第三次作业
End: Jul, 21, 2019 00:00:00
Time elapsed:
Time remaining:

Problem_ID: F
Result: Accepted
Time: 69ms
Memory: 25316kB
Author: 13372527218
In contest: 1295

def xh(ls1,ls2,n,m,k):
    g,a,b,h = 0,0,0,[]
    for i in range(k):
        for j in range(m):
            g,a = g + ls1[n][j]*ls2[a][b],a+1
        h.append(g)
        b,a,g = b + 1,0,0
    return h

n,m,k = map(int,input().split())
ls1,ls2,ls = [],[],[]
for i in range(n):
    ls1.append(list(map(int,input().split()))) 
for i in range(m):
    ls2.append(list(map(int,input().split())))

for i in range(n):
    ls.append(xh(ls1,ls2,i,m,k))

for i in range(n):
    for j in range(k):
        print(ls[i][j] , end = '' if j == k else ' ')
    print()