Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
#include<stdio.h>
main()
{
long long int n,i,j,c=0,a,b,k;
scanf("%I64d",&n);
a=1;
b=1;
k=a+b;
while(k<=n)
{ c++;
a=b;
b=k;
k=a+b;
}
printf("%I64d",c);
}
📦 Looking for Codeforces Round 382 Div Problem Tennis? Check the best deals on Amazon.
🛒 Shop Codeforces Round 382 Div Problem Tennis on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.
Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
#include<stdio.h>
main()
{
long long int n,i,j,c=0,a,b,k;
scanf("%I64d",&n);
a=1;
b=1;
k=a+b;
while(k<=n)
{ c++;
a=b;
b=k;
k=a+b;
}
printf("%I64d",c);
}
📦 Looking for Codeforces Round 382 Div Problem Tennis? Check the best deals on Amazon.
🛒 Shop Codeforces Round 382 Div Problem Tennis on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.