Given N in Gray code equivalent. Find its binary equivalent.
The first line contains an integer T, number of test cases. For each test cases, there is an integer N denoting the number in gray equivalent.
For each test case, in a new line, the output is the decimal equivalent number N of binary form.
1 <= T <= 100
0 <= n <= 108
Testcase1. 4 is represented as 100 and its binary equivalent is 111 whose decimal equivalent is 7.
Testcase2. 15 is represented as 1111 and its binary equivalent is 1010 i.e. 10 in decimal.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.