int main() { long a, b, c; long aa, bb, cc; for (a = 1; a <= 200; ++a) { aa = a*a; for (b = 1; b <= 200 - a - 1; ++b) { bb = b*b; c = 200 - a - b; cc = c*c; if (c > 0 && aa + bb == cc) printf("a=%ld b=%ld c=%ld\n", a,b,c); } } return 0; }
Spoiler For solution:
When I ran the program I got this answer: a=40 b=75 c=85 a=75 b=40 c=85
(one solution and the other trivial solution with A and B reversed)
40^2 + 75^2 = 85^2 40, 75, and 85 all are natural numbers 40 + 75 + 85 = 200
QED.
Time between reading the problem and instructing the computer how to find a solution: less than 5 minutes Time to run the program and obtain a solution: 4 milliseconds Finding a solution in less time than doing it purely by hand: priceless
Nice Christop, I did the same, but using Python. It's relatively easy to do that (no offense!). I wanna see if someone comes up with a by hand formula of it :O
I think you should keep the fire/water title screen; it's really, really epic.
I get a chance to try this today. I'm sure it'll be epic.
Edit: Yeah, this is epic. Where are the built in levels though?
Wow, record number of times "epic" used in one post? As for the levels, they're all external. There's one attached here (a simple demo, not made for playability but more for messing around with the tiles), another (actually game-like) here, and a hard one here. Have fun btw you can easily make your own levels using the editor
I probably won't be able to add it all, but I should be able to do the entire "consider it done" list. Figured out how to structure the appvars so far, and I'm working on a subroutine to add/remove levels from a levelset.