| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 36797 | 徐若宸 | 斐波那契数列 | C++ | Accepted | 1 MS | 244 KB | 262 | 2024-01-16 20:59:04 |
#include<bits/stdc++.h> using namespace std; int a;//,fbnq[10010]={0,1,1}; int fbnq(int n){ if(n==2||n==3)return 1; return fbnq(n-1)+fbnq(n-2); } int main(){ cin>>a; /*for(int i=3;i<=a;i++){ fbnq[i]=fbnq[i-1]+fbnq[i-2]; }*/ cout<<fbnq(a); }