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