#P17463. Iridescence / PYTRIP4
Iridescence / PYTRIP4
Background
This problem is an enhanced version of SPOJ PYTRIP3.
Problem Description
Given a positive integer . Find the number of distinct right triangles whose hypotenuse length is at most , and whose three side lengths are all integers.
Input Format
One line containing one positive integer .
Output Format
One line containing one non-negative integer, representing the answer.
1000000000000
4179478903392
Hint
For all testdata, .
The time limit is about times the running time of the standard solution on the slowest case.
Translated by ChatGPT 5