问题描述
样例输入
一个满足题目要求的输入范例。
3 10
样例输出
与上面的样例输入对应的输出。
数据规模和约定
输入数据中每一个数的范围。
例:结果在int表示时不会溢出。
解题思路1:
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#define ll long long
using namespace std;
int fun(int a,int b){
if(a == b || a == 0){
return 1;
}else{
return fun(a,b - 1) + fun(a - 1,b - 1);
}
}
int main(){
ll m,n;
cin >> m >> n;
cout << fun(m,n) << endl;
return 0;
}