int foo(int x, int y) { if (x <= 0 && y <= 0) return 1; return 3 * foo(x - 1, y / 2); } cout << foo(3, 5) << endl;
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题