Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
235 ZRH 斐波那契数列(递归) C++ Accepted 3 MS 256 KB 443 2022-07-22 10:38:17

Tests(15/15):


Code:

#include<iostream> //输入函数库 #include<iomanip> #include<cmath> //数学函数库 #include<cstdio> #include<ctime> #include<cstring> #include<cstdlib> #include<string> #include<stdlib.h> #include<sys/time.h> using namespace std; int t(int x){ if(x==0){ return 0; } else if(x==1){ return 1; } else { return t(x-1)+t(x-2); } } int main(){ int x; cin>>x; cout<<t(x); return 0; }