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