This is the code i have written :
print("Enter the number row and columns")
row, column = input().split()
print("Enter the rectangle size")
m, n = input().split()
Squares=row(row+1)(2*row+1)/6
print("Squares="+Squares)
Problem : Inputs are :
- row and column : 3 and 3
- m and n : 2 and 2
index values to be found out in a 3*3 matrix
The problem is from m and n how many squares of 2*2 matrix can be made in a 3*3 matrix
expected output: Squares=4
Can anyone help ?