Problem 2022. Find a Pythagorean triple

Created by Tanya Morton in CUP Challenge

Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them comprise sides of a right-angled triangle. Return true if they do, otherwise return false .

Solution Stats

50.51% Correct | 49.49% Incorrect
Last solution submitted on Nov 15, 2018

Problem Comments

Solution Comments

Recent Solvers899


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!