整数划分 递归

#include <iostream>
char *result=(char *)malloc(sizeof(char)*200);
int fun(int n,int m);

int main()
{
 std::cout< return 0;
}

int fun(int n,int m)
{
 if(n<0||m<0) return 0;
 if(n==1||m==1) return 1;
 if(n if(n==m) return 1+fun(n,m-1);
 return fun(n-m,m)+fun(n,m-1);
}

Leave a Reply

Your email address will not be published.