Ultra-fast-mathematicians

I have 2 codes for https://hack.codingblocks.com/contests/c/512/66
One passes 1st test case and the other passes 2nd test case
https://ide.codingblocks.com/s/39523
https://ide.codingblocks.com/s/39522
But none of them passes both test cases
I can’t find a problem in either of them
Pls help.
Thanks

Hey Apoorva, i have checked your https://ide.codingblocks.com/s/39523 code. you are appending the solution of all test cases in one string. Run your code when test cases are greater than 1. The correction is for each test case you have to initialise s3 with an empty string.

Thanks, sorry to bother for a silly mistake

#include
using namespace std;
int main() {
int n;
string s1,s2;
cin>>n;
for(int j=0;j<n;j++)
{
cin>>s1>>s2;

for(int i=0;i<s1.length();i++)
{
	if(s1[i]==s2[i])
		s1[i]='0';
	else
		s1[i]='1';
}
cout<<s1;
return 0;
}

}
//can anyone tell what’s wrong in this//

lmao you didn’t include iostream