Find length of longest Fibonacci series
CodeChefOpen on judge ↗
You are given a range [x, y] (inclusive). Determine the length of longest Fibonacci series that exists in [x, y]. A Fibonacci series is constructed by adding last two consecutive elements in series starting from 0 1, e.g. 0 1 1 2 3 5 8 13 ... Input First line of input contains a single integer, T, the total number of test-cases. Each of next T lines contains two space separated integers, x & y
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start