← All problemsSign in

Pythagorean triple

Identify if a triple of integers is formed by 3 integer, x, y and z, separated by a blank space and supplied not necessary in any order, is a primitive Pythagorean triple. A primitive Pythagorean triple is one in which x, y and z are coprime (that is, they have no common divisor greater than 1). For each triple entry print a line with "YES" (without quotation marks) if the integers given form a p

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