pythag3.cli

boring_math.pythagorean_triples.cli.pythag3_cli.pythag3() None

Entry point for automatically generated CGI script.

  • Pythagorean triples are three integers a, b, c where + =

  • such a triple is primitive when a,b,c > 0 and gcd(a,b,c) = 1

  • geometrically a, b, c represent the sides of a right triangle

Usage

Usage: pythag3 [m [n [max_side_length]]]

# of args

Prints all possible triples (a, b, c) satisfying

0

3 <= a <= 100

1

3 <= a <= m

2

m <= a <= n

3

m <= a <= n and a,b,c <= max_side_length