Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
13801 huyanfeng 爬楼梯 C++ 解答错误 0 MS 244 KB 248 2023-04-03 15:48:39

Tests(0/1):


#include<bits/stdc++.h> using namespace std; int f(int x) { if(x == 1) return 1; else if(x == 2) return 2; else return f(x - 2) + f(x - 1); } int main() { int ji; while(cin >> ji) { cout << f(ji) << endl; } return 0; }


测评信息: