Ultra Fast Mathematicians

Why am i getting wrong answer here

There is an explaination given in the questions:-
For the given example, Let str1 = “10111” and str2 = “10000”, Value at first position of str1 is 1 and first position str2 is 1, hence according to the rule there will be 0 at the first position of the final ans.Similarly, for second position the value at second position of both of the strings is 0,so , there will be 0 at the second position of the final ans.Similarly, for third position the value at third position of str1 is 1 and str2 is 0,so , there will be 1 at the third position of the final ans and So, on.

You have to take two strings in the input, and then compare the two strings.

If you have any other doubts, please feel free to ask.

but it is same as calculating XOR so why my code is not working?

Xor can be applied only in the case of integer.
You can try it with a different approach using two strings & compare it using a loop.

Ok thanks now i got it