What is final sum

Hi,
In equation,
Contribution of each cell in final sum= a[I][j] * no of submatrix it is part of.
What is final sum?
thanks

hello @vatsal50
create variable total=0
iterate to all the elements of the matrix and then
add total = total + a[i][j] * no of submatrix it is part of.

print total

no,I mean whether it is part of a particular submatrix or it is the sum of all submatrix the cell is part of

the later one (sum of all submatrix the cell is part of)