Fibonacci Queries
CodeChefOpen on judge ↗
The bikers are at it again with yet another problem. Can you help them? The Fibonacci numbers are a sequence of numbers in the following way: $0,1,1,2,3,5,8...$ (Every number is the sum of previous 2 numbers). Your task is to find out the sum $(\sum_{i=L}^R F_i)$ for some $L, R$. Now we really like prime numbers, and $7$ is our favorite. So we want you to print the sum modulo $7$. **Note**: $F_0
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