思路:DP
#include<iostream>
#include<cstring>
using namespace std;
int n,k;
int f[100001];
int main ()
{
cin>>n>>k;
for(int i=1;i<=k;i++)
f[i]=1;
for (int i=2;i<=n;i++)
{
for (int j=1;j<=k&&j<=i;j++)
{
f[i]+=f[i-j];
f[i]%=100003;
}
}
cout<<f[n];
return 0;
}