Tiling Problem - II

#include<bits/stdc++.h>
using namespace std;
#define endl “\n”
typedef long long ll;
const ll mod = 10e9+7;

ll sol(ll n,ll m)
{
ll dp[n+1];
for(ll i=0;i<=n;i++)
{
if(i<m)
dp[i]=1;
else
dp[i] = (dp[i-1] + dp[i-m])%mod;
}
return dp[n];
}

int main() {
int t;
cin>>t;
while(t–)
{
ll a,b;
cin>>a>>b;
cout<<sol(a,b)<<endl;
}
return 0;
}

only 1 test case is passed

+@skysinghthakur
const ll mod should be 1e9 + 7 for 10^9+7
Rest all things are correct.
Please mark the doubt as resolved.

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.