3889=神奇的函数

 1 #include<stdio.h>
 2 int recursive(int n,int m)
 3 {
 4     if(m==1||n==1)return 1;
 5     else return recursive(n-1,m)+recursive(n,m-1);
 6 }
 7 int main()
 8 {
 9     int a,b;//直接上代码,看不懂请刨坑自埋。
10     while(scanf("%d %d",&a,&b)!=EOF)
11     {
12         printf("%d\n",recursive(a,b));
13     }
14     return 0;
15 }

 

posted @ 2019-03-07 21:46  念文丶  阅读(266)  评论(0编辑  收藏  举报