Not able to understand the problem

i am not able to understand this problem

Hello @kushal1998,

Lets understand the sample test cases:
1
10111 10000

Explanation:

  1. first line contains number of test cases i.e. 1
  2. In each test case you have given 2 strings made of 0 and 1.
    a=10111 and b=10000
  3. You have to print a single string

Considerations:
if the ith index of a and b strings are different then append ‘1’ to the resultant string.
else append ‘0’ to it.

For above example:
index 0:
a=1 and b=1 (same)
so, c+= ‘0’; (‘0’)

index 1:
a=0 and b=0 (same)
so, c+= ‘0’; (‘00’)

index 2:
a=1 and b=0 (different)
so, c+=‘1’; (‘001’)

index 3:
a=1 and b=0 (different)
so, c+=‘1’; (‘0011’)

index 4:
a=1 and b=0 (different)
so, c+=‘1’; (‘00111’)

so, output is 00111

Hope, this would help.
Give a like if you are satisfied.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.