100% Guaranteed Results


Project Euler #218: Perfect right-angled triangles Solved
$ 29.99
Category:

Description

5/5 – (1 vote)

This problem is a programming version of Problem 218 from projecteuler.net
Consider the right angled triangle with sides which is divisible by the perfect numbers and Moreover it is a primitive right angled triangle as Also is a perfect square.
We will call a right angled triangle perfect if it is a primitive right angled triangle its hypotenuse is a perfect square
We will call a right angled triangle super-perfect if it is a perfect right angled triangle and its area is a multiple of the perfect numbers and .

. The area of this triangle is ,
.

How many perfect right-angled triangles with exist that are not super-perfect?
Input Format
First line of each test file contains a single integer that is the number of queries. lines follow, each containing an integer – an upper bound of the largest side of the triangle.
Constraints

Output Format
Print exactly lines with a single integer on each: an answer to the corresponding query.
Sample Input 0

Sample Output 0

1/2
Explanation 0
As we can see from the problem statement, the only perfect triangle with is super-perfect.
2/2

Reviews

There are no reviews yet.

Be the first to review “Project Euler #218: Perfect right-angled triangles Solved”

Your email address will not be published. Required fields are marked *

Related products