递归
#include <iostream>
using namespace std;
int f(int a,int b)
{
if(a<b) return 0;
else if(b==0) return 1;
else if(b<=a) return f(a-1,b)+f(a,b-1) ;
}
int main(int argc, char *argv[])
{
int m,n;
while(cin>>m>>n)
cout<<f(m,n)<<endl;
return 0;
}
#include <iostream> using namespace std;
int f(int a,int b)
{ if(b==0) return 1 ;
if(a<b) return 0 ;
else return f(a-1,b)+f(a,b-1) ;
}
int main(int argc, char *argv[])
{
int m,n;
while(cin>>m>>n)
cout<<f(m,n)<<endl;
return 0;
}