CommonLounge Archive

[FIBOSUM] Fibonacci Sum

December 06, 2017

Given two non-negative integers N and M, you have to calculate the sum F(N) + F(N + 1) + … + F(M) mod 1000000007, where F(X) = X-th fibonacci number


© 2016-2022. All rights reserved.