Shubham and Inverse Fibonacci
CodeChefOpen on judge ↗
Shubham is very fond of Sequences. Now, He designs his own sequence named Inverse Fibonacci. In this sequence the first and second terms are fixed and the next term is the difference of the last two terms. For eg. Tn=Tn-2-Tn-1 for n greater than 2. One day Shubam gave his friend Gaurav a problem related to his new sequence. "He gave the first and second term of the sequence and wants to know th
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