Pythagorean Triangle is a right triangle all sides of which are represented by integers. Examples are triangles with sides
and
.
Our goal in this exercise is to write a function that outputs the maximum number of unique pythagorean triangles that can fit inside a circle of radius R, with overlaps are allowed.
For example if
, the following unique pythagorean triangles can fit inside the circle:
,
,
,
,
, and
. Hence, for
, the function should return 6.
--------------------
NOTE: Unique means that congruent triangles, even if rotated or reflected, are counted only once.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers3
Suggested Problems
-
Find relatively common elements in matrix rows
2158 Solvers
-
Numbers with prime factors 2, 3 and 5.
683 Solvers
-
Given a window, how many subsets of a vector sum positive
873 Solvers
-
Set the array elements whose value is 13 to 0
1452 Solvers
-
Golomb's self-describing sequence (based on Euler 341)
190 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!