Given a decimal number m. Convert it in binary string and apply n iterations, in each iteration 0 becomes 01 and 1 becomes 10. Find kth character in the string after nth iteration.
The first line consists of an integer T i.e number of test cases. The first and only line of each test case consists of three integers m,k,n.
Print the required output.
1 <= T <= 100
1 <= m <= 50
1 <= n <= 10
0 <= k <|Length of final string|
5 5 3
11 6 4
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.