fork download
  1. #include <iostream>
  2. using namespace std;
  3. int febo(int x)
  4. {
  5. if (x==1)
  6. return 1;
  7. else if (x==2)
  8. return 1;
  9. else
  10. return febo(x-1) + febo(x-2);
  11. }
  12. int main() {
  13. // your code goes here
  14. int n;
  15. cin>>n;
  16. cout<<febo(n) ;
  17. return 0;
  18. }
Time limit exceeded #stdin #stdout 5s 8163328KB
stdin
Standard input is empty
stdout
Standard output is empty