← All problemsSign in

Sums in a Triangle

CodeChefRating 869Open on judge ↗

Given an integer $N$, let us consider a triangle of numbers of $N$ lines in which a number $a_{11}$ appears in the first line, two numbers $a_{21}$ and $a_{22}$ appear in the second line, three numbers $a_{31}$, $a_{32}$ and $a_{33}$ appear in the third line, etc. In general, $i$ numbers $a_{i1}, a_{i2} \dots a_{ii}$ appear in the $i^{th}$ line for all $1 \leq i \leq N$. Develop a program that wil

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