MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

Codeforces_problems/Fibonacci army 72G/solution.cpp:4–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3
4int main(){
5 vector<int> v;
6
7 v.push_back(1);
8 v.push_back(1);
9
10 for(int i=2 ;i<21;i++){
11 v.push_back(v[i-2]+v[i-1]);
12 }
13
14 // V is vector that store the first 20 fibonacci number
15
16 int n;
17
18 cin>>n;
19
20 // Now we return the wanted number in position n
21 cout<<v[n]<<endl;
22
23 return 0;
24}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected