|
|
back to boardIt is useful for you... x^2 + y^2 = A * p + k; you use this simple algorithm: A = [0....p] and simple Check: first time : y = 0 and x = sqrt(A*p + k) if(x*x == A*p + k) you should Print this answer: x and y else second time: x = (int) sqrt(A*p + k) and y = sqrt(A*p + k - (int)x*x) if(x*x + y*y == A*p + k) you should Print this answer : x and y else continue and increasing only ONE count of A Sorry my English... Edited by author 04.01.2014 13:44 Edited by author 26.05.2014 22:39 Re: It is useful for you... x and y are INTEGER.... |
|
|