#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