Newton Per Metre Square
CodeChefOpen on judge ↗
Chef is a mathematical genius. He has made a new friend, Newton, who has struggle in understanding numbers. Chef has $N$ number of sets indexed $1$ through $N$. The size of the $i$-th set will be $i$. The first and last element of every set is $1$. Rest of the elements in a set are formed by adding the corresponding consecutive numbers in the previous set. Chef wants Newton to write a program
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