Crack the math!

3

1 votes
Problem

Given two binary numbers A,B i.e., numbers containing only zero or one. Let the i th bit of A and i th bit of B differ by d. We need to form a binary number C such that the i th bit of C = 1 if 2^d is even, else it should be 0.

Input : First line contains the number of test cases T For each test case, 2 lines containing A and B respectively

Constraints : 1 <= T <= 100000 Both A, B are of same length. Don't ignore leading zeros. A, B have at most 100 bits

You can view the editorial to this problem here!

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?