yaworsw/euler-manager

View on GitHub
data/problems/91.yml

Summary

Maintainability
Test Coverage
---
:id: 91
:name: Right triangles with integer coordinates
:url: https://projecteuler.net/problem=91
:content: "The points P (_x_<sub>1</sub>, _y_<sub>1</sub>) and Q (_x_<sub>2</sub>,
  _y_<sub>2</sub>) are plotted at integer co-ordinates and are joined to the origin,
  O(0,0), to form ΔOPQ.\n\n ![]({{ images_dir }}/p091_1.gif)  \n\nThere are exactly
  fourteen triangles containing a right angle that can be formed when each co-ordinate
  lies between 0 and 2 inclusive; that is,  \n0 ≤ _x_<sub>1</sub>, _y_<sub>1</sub>,
  _x_<sub>2</sub>, _y_<sub>2</sub> ≤ 2.\n\n ![]({{ images_dir }}/p091_2.gif)  \n\nGiven
  that 0 ≤ _x_<sub>1</sub>, _y_<sub>1</sub>, _x_<sub>2</sub>, _y_<sub>2</sub> ≤ 50,
  how many right triangles can be formed?\n\n"