Given two integers, L and U. Find the sum of integers bounded by L and U, (both inclusive). Modulo the sum with (10^9 + 7).
Example,
if L = 1, U = 2, output = 3. because 1+2 =3.
if L = 3, U = 5, output = 12, because 3+4+5 = 12.
both L and U will be positive.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers47
Suggested Problems
-
3452 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2594 Solvers
-
532 Solvers
-
488 Solvers
-
Sum of the Multiplication of Vectors
287 Solvers
More from this Author5
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!