Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130212 郝王骏程 斐波那契数列(递归) C++ Compile Error 0 MS 0 KB 435 2025-09-08 20:50:52

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; long long akm(int m){ if (m==0) return 0; if (m==1) return 1; else return f(n - 1) + f(n - 2); } int main(){ int d; cin>>d; cout<<akm(d); return 0; }


Run Info:

Main.cc: In function 'long long int akm(int)':
Main.cc:13:12: error: 'n' was not declared in this scope
  return  f(n - 1) + f(n - 2);
            ^
Main.cc:13:17: error: 'f' was not declared in this scope
  return  f(n - 1) + f(n - 2);
                 ^