Advertisement
Saleh127

UVA 10450

Sep 18th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10. ll fiv[52],i,j,k,l,a;
  11.  
  12. fiv[1]=2;
  13. fiv[2]=3;
  14. for(i=3;i<51;i++)
  15. {
  16. fiv[i]=fiv[i-1]+fiv[i-2];
  17. }
  18.  
  19. test
  20. {
  21. cin>>a;
  22. cout<<"Scenario #"<<cs<<":"<<endl;
  23. cout<<fiv[a]<<endl<<endl;
  24. }
  25.  
  26.  
  27. return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement