[Coco] Project Euler and the Coco

James Jones jamesjones01 at mchsi.com
Tue Nov 18 00:44:29 EST 2008


Mark McDougall wrote:
> Arthur Flexser wrote:
> 
>> The ascending length requirement means that B must
>> take up no more than half of the remaining board, or (1000-A)/2.  
> 
> (a^2 + b^2)= c^2
> (a^2 + b^2) = (a+b)^2 - 2ab = c^2
> therefore, a+b > c

a + b > c is true by the triangle inequality, no need to work that hard 
for it.

> a + b > (1000 - a - b)
> 2a + 2b > 1000
> (a+b) > 500
> ie, b > (500-a)

Nicely done; that hadn't occurred to me.

	James



More information about the Coco mailing list