#P363. 练62.2 矩阵乘法
练62.2 矩阵乘法
Description
Calculate the multiplication of two matrices. When multiplying an matrix by an matrix , the resulting matrix is of size , where $C[i][j] = A[i][0] \times B[0][j] + A[i][1] \times B[1][j] + \ldots + A[i][m-1] \times B[m-1][j]$ ( represents the element in the -th row and -th column of matrix ).
Input Format
First line contains , , , indicating that matrix is rows by columns, and matrix is rows by columns, where , , are all less than .
Then input matrices and in sequence, where is rows by columns and is rows by columns. The absolute value of each element in the matrices will not exceed .
Output Format
Output matrix , consisting of lines, each containing integers separated by a single space.
Sample
3 2 3
1 1
1 1
1 1
1 1 1
1 1 12 2 2
2 2 2
2 2 2