STRANGE SEQUENCE
CodeChefOpen on judge ↗
Problem description. The Fibonacci sequence is defined as g(n) = g(n-1) + g(n-2). But this is Fibonacci with a twist. A curious student thought of changing it to f(n) = f(n-1) + 2*f(n-2). with f(1) = 1 and f(2) = 5 He made up few terms(initial given) but then he had to complete other assignments. So now he wants your help. Given t test cases with each n print out f(n) mod 10000007. Input Firs
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