Sum of consecutives
CodeChefOpen on judge ↗
This time it was WonderKing’s opportunity to challenge WonderMath, although it is hard to give him a challenge, king gave a challenge. It is like follows. King gives a number that is sum of most 10 consecutive numbers and least 2 consecutive numbers. WonderMath has to find those consecutive numbers which has to add. As an Example : We can write 18 as the sum of consecutive as follow, 18 = 5
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