Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cmath>
- using namespace std;
- int main()
- {
- long long res1=1, res2=1, a=0;
- cin >> a;
- int arr[46];
- if (a==0)
- cout << 1;
- else for (int i=4; i<47; i++)
- {
- res2+=res1;
- res1=res2-res1;
- if (a==res2)
- {
- res1 = i;
- cout << res1;
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement