#include
#include
using namespace std;
#define ll long long
int main() {
ll tc;
cin>>tc;
while(tc–)
{
string m, n;
ll a,b;
cin>>m>>n;
ll l = m.length();
ll arr[l],i;
a = stoi(m);
if(a<0)
{
a = a - (2*a);
}
b = stoi(n);
if(b<0)
{
b = b - (2*b);
}
ll x=0,y=0;
for(i=l-1;i>=0;i--)
{
x = a%10;
y = b%10;
arr[i] = x^y;
a = a/10;
b = b/10;
}
for(i=0;i<l;i++)
{
cout<<arr[i];
}
cout<<endl;
}
return 0;
}
This is my code for the fast math problem. I scored 50/100. I have checked all the possible cases. I’ve accounted for negative numbers and I’m printing the leading 0s as well. Can you give me a test case for which this code won’t work?