1 #define mm(a) memset(a,0,sizeof(a)); 2 #define max(x,y) (x)>(y)?(x):(y) 3 #define min(x,y) (x)<(y)?(x):(y) 4 #define Fopen freopen("1.in","r",stdin); freopen("m.out","w",stdout); 5 #define rep(i,a,b) for(int i=(a);i<=(b);i++) 6 #define per(i,b,a) for(int i=(b);i>=(a);i--) 7 #include<bits/stdc++.h> 8 typedef long long ll; 9 #define PII pair<ll,ll> 10 using namespace std; 11 const int INF=0x3f3f3f3f; 12 const int MAXN=(int)2e5 + 5; 13 const ll mod=1e9+7; 14 15 ll dp[200][200]; 16 int countapples(int m,int n) { 17 if(m<0)return 0; 18 if(m==0||n==1)return 1; 19 if(~dp[m][n])return dp[m][n]; 20 return dp[m][n]=countapples(m-n,n)+countapples(m,n-1); 21 } 22 23 int main() { 24 memset(dp,-1,sizeof(dp)); 25 int m,n,t; 26 long long temp; 27 while(~scanf("%d,%d",&m,&n)) { 28 temp=countapples(m,n); 29 printf("%lld ",temp); 30 } 31 return 0; 32 }