//poj 1283
//sep9
#include <iostream>
using namespace std;
typedef __int64 INT;
const int MAXN=200;
INT dp[MAXN+10][MAXN+10];
int main()
{
int N,K;
memset(dp,0,sizeof(dp));
for(int i=0;i<=MAXN;++i)
dp[i][i]=1;
for(int i=1;i<=MAXN;++i)
for(int j=1;j<=i;++j)
dp[i][j]=dp[i-1][j-1]+dp[i-j][j];
while(scanf("%d%d",&N,&K)==2){
if(N==0&&K==0)
break;
printf("%I64d\n",dp[N][K]);
}
return 0;
}
poj 1283 Moving Computer dp解小球放小盒
最新推荐文章于 2019-02-28 08:58:35 发布