Determine all possible pairs (x,y) of
positive integers, with x ≤ y, that satisfy this equation:
x*y = 160 + 90*gcd(x,y)
10 for Tot=2 to 999
20 for X=1 to int(Tot/2)
30 Y=Tot-X
40 Lhs=X*Y
50 Rhs=160+90*gcd(X,Y)
60 if Lhs=Rhs then print X,Y,Lhs
70 next
80 next
finds
x y prod
10 34 340
2 125 250
2 170 340
1 250 250
|
Posted by Charlie
on 2013-10-04 11:48:37 |