Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56695 | zhangweiran | 斐波那契数列 | C++ | Accepted | 1 MS | 240 KB | 219 | 2024-11-15 15:00:48 |
#include<bits/stdc++.h> using namespace std; int fib(int n){ if(n==1) return 0; else if(n==2) return 1; else return fib(n-1)+fib(n-2); } int main(){ int x; cin>>x; cout<<fib(x); }//zhangsicun is sb!!!!!