0%

Problem 309


Problem 309


Integer Ladders

In the classic “Crossing Ladders” problem, we are given the lengths x and y of two ladders resting on the opposite walls of a narrow, level street. We are also given the height h above the street where the two ladders cross and we are asked to find the width of the street (w).

Here, we are only concerned with instances where all four variables are positive integers.
For example, if x = 70, y = 119 and h = 30, we can calculate that w = 56.

In fact, for integer values x, y, h and 0 < x < y < 200, there are only five triplets (x,y,h) producing integer solutions for w:
(70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) and (119, 175, 40).

For integer values x, y, h and 0 < x < y < 1 000 000, how many triplets (x,y,h) produce integer solutions for w?


整数梯子

在经典问题“穿越梯子”中,我们已知两架长度分别为x和y的梯子相对靠在一条狭长、水平街道的两侧墙上。我们还知道两架梯子相交处的高度为h,最终目标是求街道的宽度(w)。

在这个问题中,我们只关心所有四个变量均为正整数的情况。
例如,如果x = 70,y = 119,h = 30,我们可以计算出w = 56。

事实上,若x、y、h均取正整数,且0 < x < y < 200,只有五个三元组(x,y,h)能解出w为整数:
(70, 119, 30)、(74, 182, 21)、(87, 105, 35)、(100, 116, 35)和(119, 175, 40)。

若x、y、h均取正整数,且0 < x < y < 1 000 000,有多少个三元组(x,y,h)能解出w为整数?