Help me find the error in the recursion code below for tiling problem?

def tile(n,m):
if n==0:
return 1
a,b=0,0
if n>0:
a = tile(n-1,m)
if n>=m:
b = tile(n-m,m)
return a+b

t = int(input())
for _ in range(t):
n,m = list(map(int,input().split()))
if m>n :
print(1)
continue
elif n==m:
print(2)
continue
x = tile(n,m)
print(x)

hey @gandikotasasia1_d6d586dbd5c4388c 20 score can be achieved using recursion. To achieve 100 you have to use dynamic programming. If you are familiar with the concept you can give it a try. Else try it when you will complete your dp section.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.