Created
February 24, 2011 02:11
-
-
Save jaredcacurak/841620 to your computer and use it in GitHub Desktop.
A Groovy solution for Project Euler - Problem 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// brute force | |
100.upto 300, { a -> | |
a.upto 400, { b -> | |
b.upto 500, { c -> | |
if (a + b + c == 1000 && a * a + b * b == c * c) | |
println "$a * $b * $c = " + a * b * c | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment