← All problemsSign in

Lelouch and Matchsticks

Problem description. Finally Lelouch has reached “Kyoto”. There he found many odd looking sticks under a tree. When he looked more closely, he found a message engraved on the tree saying- “You can perform magic with a GOOD stick!! A stick of length ‘L’ is GOOD if there exists a right angled triangle whose length all the sides are positive integers and the length of the HYPOTENUSE = L !! “ Lelou

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