View Single Post
Old 2017-12-20, 16:16   #5
Alberico Lepore
 
Alberico Lepore's Avatar
 
May 2017
ITALY

52210 Posts
Default

I will start the implementation (if I can) while I explain the algorithm
from a structural error I found a very quick solution
a^2+n*a=1829
3*a^2-m*a=1829
A=a^2+r*a=1829-[3*a^2-1829] -> r=n-m
B=a^2+s*a=-[3*a^2-1829]+[1829-[3*a^2-1829]] ->s=r-m
a^2+t*a=-A-B -> s+r=t ERROR=WIN
s+r=t+1

I do not know exactly if I have to do X + Y or X-Y or -X + Y or -X-Y
but I know there will be an error in the right path,
using this error I find the solution

a^2+n*a=1829
3*a^2-m*a=1829
A=a^2+r*a=1829-[3*a^2-1829]
B=a^2+s*a=-[3*a^2-1829]+[1829-[3*a^2-1829]]
a^2+t*a=-A-B
s+r=t+1

test 1 and -1
Alberico Lepore is offline   Reply With Quote