Input Format
First line of input contains an integer T denoting the number of test cases. Then T test cases follow.
The first line of each test case contains two integers N and M.
I wanted to know how to do this using recursion as the editorial was not a recursive approach.
Thanks