#include <stdio.h>
int diGui(int k,int n)
{
if(k>n/2)
k=n-k;
if(k==0||n==1)
return 1;
else return diGui(k,n-1)+diGui(k-1,n-1);
}
int main()
{
int k,n;
scanf("%d%d",&k,&n);
printf("%d",diGui(k,n));
return 0;
}
原文:http://blog.51cto.com/13176924/2091402