So uh.
a^2 + b^2 + c^2 = 2009What's a,b,c. There's more than one possibility. My professor asked this question today. No one got it. (Including me. idk the answer).So uh.
a^2 + b^2 + c^2 = 2009What's a,b,c. There's more than one possibility. My professor asked this question today. No one got it. (Including me. idk the answer).
sqrt(2009/3) = 25.87791851
a, b, and c are these.I couldn't make the fraction.As long as a, b and c add up to 2009/3, it works. Right?One answer is:
8, 24, 37and so is:22, 25, 30Edit: Meh, I was shh-ing these to Glen but since _Player_ spoiled…All possible integer answers (excluding answers with 0 as a number):Here's my solution xD:
@Player - I'm assuming that he means integers only. Also, there's a much simpler way to do it:
int max_val=ceil(sqrt(2009));//maximum viable number (0^2 + 0^2 + max_val^2) for(int x = 1; x <= max_val; x++) { [tab]for(int y = x; y <= max_val; y++) [tab]{ [tab][tab]for(int z = y; z <= max_val; z++) [tab][tab]{ [tab][tab][tab]if(x*x + y*y + z*z == 2009) [tab][tab][tab][tab]cout << x << "," << y << "," << z << "\n"; [tab][tab]} [tab]} }Also, you can consider that as the sphere centered on (0,0,0) with radius sqrt(2009), and then you would have infinite real solutions.
Yeah, that is the answer: the sphere with center point (0,0,0) with radius sqrt(2009). The perfect representation of the infinite number of answers :D
a=3
b=20c=40Wouldn't be too hard to write a small program that could "brute force" it, but that's probably considered cheating.
@Mordi
Desert fox and I have each done that and posted the codes >_>Thanks :D