Problem of the day
Let 'X' = 3 and 'Y' = 6, Alice adds 1 to 'X' since 'X' is odd. Now 'X' will become 4. Then, Alice will add 2 to 'X', since 'X' is even, and it will become 6. 'X' becomes equal to 'Y'. Hence we will return 1 as the answer.
The first line contains an integer 'T', which denotes the number of test cases.
For every test case:-
The first line contains two integers, 'X' and 'Y', the variables mentioned above.
For each test case, Return 1 if 'X' can be made equal to 'Y' using the above operations any number of times(possibly 0) and 0 otherwise.
You don’t need to print anything. Just implement the given function.
1 <= 'T' <= 10
1 <= 'X', 'Y' <= 10^9
Time Limit: 1 sec
2
4 8
1 1
1
1
First test case:-
In 1st operation, Alice will add 2 to 'X' as 'X' is even. Now, 'X' is 6. Again, in the 2nd operation, Alice will add 2 to 'X'. Now 'X' is 8, which is equal to 'Y'. So, the answer is 1.
Second test case:-
'X' is already equal to 'Y'. So, the answer is 1.
2
4 9
7 8
0
1