测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A24134. #include <iostream> using namespace std; int f(int m, int n) { if (m == 0 || n == 0) return 1; return f(m - 1, n) + f(m, n - 1); } int main() { int a, b; cin >> a >> b; cout << f(a, b) << endl; retur…

判断题 较易

题目描述

#include <iostream>
using namespace std;

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

int main() {
    int a, b;
    cin >> a >> b;
    cout << f(a, b) << endl;
    return 0;
}

输入 2 2,输出结果是 5。(    )

选项(单选)

上一题 下一题