Triangle Trouble
CodeChefOpen on judge ↗
Himanshu loved Maths.His favorite topics were series and triangles. His friend Rohan gave him a series as follows. 7 , 31 , 71, 127, 199, 287... Create a triangle from the above pattern as shown in the output. Each row contains maximum elements as indicated by the row number. This means that the T th row will contain a maximum of T elements.To make the pattern difficult Rohan placed the followin
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