Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
234 | 刘家源 | 斐波那契数列(递归) | C++ | Runtime Error | 26 MS | 65776 KB | 287 | 2022-07-22 10:36:06 |
#include<iostream> #include<cstdio> #include<string> #include<iomanip> #include<cmath> using namespace std; int f(int n) { if(n==0) return 1; else return f(n-1)+f(n-2); } int main(){ int x; cin>>x; cout<<f(x); return 0; }
Runtime Error:Segmentation fault