Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
68046 夏轩淇 斐波那契数列(递归) C++ Accepted 3 MS 272 KB 225 2024-03-18 19:18:26

Tests(15/15):


Code:

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