提交时间:2023-12-09 08:53:12
运行 ID: 114751
#include<bits/stdc++.h> #define int unsigned long long using namespace std; int dp[114514]; signed main(){ int n,m; cin>>n>>m; dp[0] = 1; for (int i = 1;i <= n;i++){ for (int j = 1;j <= m;j++){ if (j > i){ break; } dp[i] += dp[i - j]; } } cout<<dp[n]; return 0; }