Doubt in Tiling problem

My code is running for only one test case. I am not able to understand what is wrong with the code. Someone please help. Thank You.
Here is my code:

#include
#define ll long long int
using namespace std;
ll countTiles(ll n, ll m)
{
ll c[n + 1];
c[0] = 0;
c[1] = 1;
for (ll i = 2; i <= n; i++) {
if (i > m)
c[i] = c[i - 1] + c[i - m];
else if (i < m)
c[i] = 1;
else
c[i] = 2;
}

return c[n]; 

}
int main() {
ll t;
cin>>t;
while(t–)
{
ll n,m;
cin>>n>>m;
cout<<countTiles(n,m)%1000000007<<endl;
}
return 0;
}

Please send your code id. Paste your code in coding blocks ide and save it, then send the link of the code.