Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
79769 雷瀚迪 斐波那契数列(递归) C++ Accepted 5 MS 272 KB 194 2024-07-10 10:25:40

Tests(15/15):


Code:

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