Given integer matrices A and B, with dimensions m x n and n x p respectively, calculate their matrix product C = A * B. The resulting matrix must have dimensions m x p.
A differs from the number of rows in B, explicitly specify how your implementation responds—for example, by returning an empty result or raising an error.m n p, followed by m rows of A, followed by n rows of Bm rows containing p integers each, representing matrix C1 <= m, n, p <= 200Input:
2 3 2
1 2 3
4 5 6
7 8
9 10
11 12
Output:
58 64
139 154
The first output row is obtained by multiplying each row of A by the columns of B; the second row is calculated in the same way.