forked from Alexey/DAS_2024_1
10 lines
232 B
Python
10 lines
232 B
Python
|
def matrix_multiply_sequential(A, B):
|
||
|
n = len(A)
|
||
|
result = [[0] * n for _ in range(n)]
|
||
|
|
||
|
for i in range(n):
|
||
|
for j in range(n):
|
||
|
result[i][j] = sum(A[i][k] * B[k][j] for k in range(n))
|
||
|
|
||
|
return result
|