Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
44645 zhangchunhong 斐波那契数列 C++ Compile Error 0 MS 0 KB 216 2024-03-31 18:20:44

Tests(0/0):


#include<iostream> #include<cstring> using namespace std; int main() { long long a[10000]; a[1]=0; a[2]=1; int n; cin>>n; for(int i=3;i<=n;i++){ a[i]=a[i-1]+a[a-2]; } cout<<a[n]; return 0; }


Judgement Protocol: