Help me in solving STC12 problem

My issue

My code

// Update the code below to solve this problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
	int t;
    cin >> t;
	
	while(t--)
	{
	    int N;
        cin >> N;
        string S, R;
	    cin >> S >> R;
	    bool flag=true;
	    for(int i=0;i<N;i++){
	        if(S[i]==R[i]){
	            flag=false;
	            break;
	        }
	    }
	    if(flag==true){
	        cout<<"1"<<endl;
	    }
	    else{
	        cout<<"0"<<endl;
	    }
	 
	}
}
        

Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone

All the buttons are associated with the single bulb.
So, if odd number of switches changes their state, the state of the bulb changes.
Calculate the number of switches which changed their state.

please give me a code for this

// Update the code below to solve this problem

include <bits/stdc++.h>
using namespace std;

int main()
{
int t;
cin >> t;

while(t--)
{
    int N;
    cin >> N;
    string S, R;
    cin >> S >> R;
    int count = 0;
    for(int i=0;i<N;i++){
        if(S[i] != R[i]){
            count++;
        }
    }
    if(count%2 != 0){
        cout<<0<<endl;
    }
    else{
        cout<<1<<endl;
    }
}

}

Thnx Budddyyyyy :heavy_heart_exclamation: