Given two numbers A and B, find Kth digit from right of AB.
The first line of the input contains T denoting the number of test cases. T testcases follow. Each of the next T lines contains three space separated positive integers denoting the value of a , b and k respectively.
For each test case, in a new line, output the Kth digit from right of AB in new line.
1 <= T <= 100
1 <= A , B <=15
1 <= K <= |totaldigits in AB|
3 3 1
5 2 2
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.