It's showing wrong answer

According to me the code is correct.Not able to understand what is wrong with my code.

@sunidhi10bamity,

suggested approach:

After taking the input, we enter a for loop with range from 0 to n-1 , where n is the length of the input string(both strings have the same length). We extract one character from each string and put them in two character variable a and b.

We now check whether they are the same character or not. If they are the same, we output 0. Otherwise, we print out 1 since a and b are not same characters.

After the loop is finished, we get the desired output binary string.