Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
61076 | zhangweiran | 斐波那契数列 | C++ | Accepted | 0 MS | 240 KB | 210 | 2025-02-21 22:00:15 |
#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 i