Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
137249 彭士宝 年龄问题 C++ Accepted 1 MS 268 KB 219 2025-11-16 22:02:34

Tests(1/1):


Code:

#include <iostream> using namespace std; int c_n(int n) { if (n == 1) { return 10; } else { return c_n(n - 1) + 2; } } int main() { cout << c_n(5) << endl; return 0; }