Tiling 2 oroblem question

#include
using namespace std;
long long tiling(long long n,long long m)
{ if(n==m)
return 2;
if(n<m)
return 1;
return (tiling(n-1,m)+tiling(n-m,m));
}
int main() {
int T;
cin>>T;
while(T–){
long long n,m;
cin>>n>>m;
cout<<tiling(n,m)<<endl;

}
return 0;
}

Print answer for every test case in a new line modulo 10^9+7.
i m not getting the outpiut.
and i mnot able to understand how to print the output according to the given question

hi Anuj
this question can be solved by dynamic programming due to optimization problems.
and while calculating answer at every step do modulo.

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.