← All problemsSign in

Chef and a New Home

Chef wanted to reach another milestone in his journey. So Chef decided to meet up with **Unacademy**. Chef was sure **Unacademy** will support him for eternity. But as tradition goes Unac from **Unacademy** presented the following welcome task for Chef to solve. Unac gave Chef a magical sequence of $N$ numbers $[m_1,m_2,m_3,......m_N]$. The given sequence is magical because sum of this seque

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start