Triangles
CodeChefOpen on judge ↗
Sam has pencils of different lengths, that follow an order. If he has n pencils than their lengths are in increasing order starting from 1, for example: if he has 4 pencils then they are of length 1,2,3,4. Thus if he has n pencils, then he has exactly one pencil of each the lengths from 1 through n. Input Each test case will contain an integer n(3Output For each test case, output on a line the
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