my code giving TLE for the test case
Class assignment
@Bansaljatin05
Your code requires a lot of time to work. As it is mentioned in the problem statement that n<=44 and your first loop works till 2^n. That means in worst case your code will work 2^44 = 1.75 * 10^13 recursive calls. Your code will not work for these constraints. Try to optimize this code. You might have to change much of your code. Think of a better way to solve this problem.
If you look closely at the testcases and answers , you will notice there is a pattern forming up. Just write down the answers for values upto 5 or 6. Notice these values and look out for some pattern forming up. When you find this pattern , write a code to precompute the values for this pattern upto the largest value of n specified in the constraints. After this run the testcase loop and simply output the stored values which we computed during our precomputation part.