Codeforces Round #382 (Div. 2), problem: (C) Tennis Championship Solution in C/C++

By |2017-04-07T22:11:48+00:00December 17th, 2016|Categories: C/C++, Programming|Tags: , , , , , , , |

#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); }