#include <cstdio>
#include <cstdlib>
#include <iostream>
using namespace std;
int a[101][101];
int b[101][101];
int c[101][101];
int main(int argc, char* argv[]) {
int m, n, p;
int i, j, k;
scanf("%d %d %d", &m, &n, &p);
for (i = 1; i <= m; i++)
for (j = 1; j <= n; j++)
scanf("%d", &a[i][j]);
for (i = 1; i <= n; i++)
for (j = 1; j <= p; j++)
scanf("%d", &b[i][j]);
for (i = 1; i <= m; i++)
for (j = 1; j <= p; j++)
for (k = 1; k <= n; k++)
c[i][j] += a[i][k] * b[k][j];
for (i = 1; i <= m; i++)
for (j = 1; j <= p; j++)
printf("%d%c", c[i][j], j == p ? '\n' : ' ');
return 0;
}
|