For this Question: You are given a chessboard of size N x N, where the top left square is black. Each square contains a value. Find the sum of the values of all black squares and all white squares.

Remember that in a chessboard black and white squares are alternate.The first line of input will be the N size of the matrix. Then next N lines will consist of elements of the matrix. Each row will contain N elements since it is a square matrix.

<b>Constraints:-</b>
1 &le; N &le; 800
1 &le; Matrix[i][j] &le; 100000
Print two lines, the first line containing the sum of black squares and the second line containing the sum of white squares.Input 1:
3
1 2 3
4 5 6
7 8 9

Output 1:
25
20

Sample Input 2:
4
1 2 3 4
6 8 9 10
11 12 13 14
15 16 17 18

Sample Output 2:
80
79

<b>Explanation 1</b>
The black square contains 1, 3, 5, 7, 9; sum = 25
The white square contains 2, 4, 6, 8; sum = 20, I have written this Solution Code: n=int(input())
bSum=0
wSum=0
for i in range(n):
	c=(input().split())
	for j in range(len(c)):
		if(i%2==0):
			if(j%2==0):
				bSum+=int(c[j])
			else:
				wSum+=int(c[j])
		else:
			if(j%2==0):
				wSum+=int(c[j])
			else:
				bSum+=int(c[j])
print(bSum)
print(wSum), In this Programming Language: Python, Now tell me if this Code is compilable or not?