Sum of products (easy version)
CodeChefOpen on judge ↗
Given a set $S$ containing all the integers from $l$ to $r$, where $l$ + 1 < $r$. Three distinct integers $i$, $j$ and $k$ can be selected from $S$ such that $i$ < $j$ < $k$ to form a triplet ($i, j, k$). Find the sum of $i\cdot j\cdot k$ for all the possible triplets that can be chosen from $S$. As the answer can be very large, print answer modulo $10^9+7$. ### Input - The first line contains a
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