Timer is Running

Multiply Matrices
Submissions: 9776   Accuracy:


  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!
Associated Course(s):   Sudo Placement 2

Given two square Matrices A[][] and B[][]. Your task is to complete the function multiply which stores the multiplied matrices in a new matrix C[][].

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer N denoting the size of the square
matrix . Then in the next two lines are N*N space separated values of the matrix A[][] and B[][].

For each test case in a new line output will be 
the space separated values of the matrix C[][].

1 <=T<= 100
1 <= N <= 20


Example(To be used for the expected output):
7 18 2 9 
14 5 5 18 
17 4 17 16 
9 2 7 1 
188 359 73 172 
181 38 265 50 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth
Author: saksham seth

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.