Help me in solving SMXR problem

My issue

According to me for all cases answer will be ((n*m)/4)6 and for n=4 m=4 answer should be 24 not 20 So can someone explain how the real answer of (44) matrix is 4

My code

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    ll n,m;
	    cin>>n>>m;
	    ll as=(n*m)/4;
	    cout<<as*6<<endl;
	}

}

Problem Link: Sum of Xors Practice Coding Problem

for 4*4 matrix ans will be 20
for k=6
the matrix can be written as
1100
1010
0110
0000
ugliness=0
same for k=10 last row become with all one
so ans will be 24-4=20