← All problemsSign in

FIND HYPOTENUSE

Alice and Bob are returning home from their math class. The teacher was discussing Pythagoras' Theorem in class. All of a suddden Alice came up with an intriguing question. He asked Alice what would be the hypotenuse of least length of exactly N distinct right triangles. Alice who was not quite as sharp as Bob said, "I don't quite understand the question. What do you mean by N distinct triangles?"

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