Skip to content

Instantly share code, notes, and snippets.

@jaredcacurak
Created February 24, 2011 02:11
Show Gist options
  • Save jaredcacurak/841620 to your computer and use it in GitHub Desktop.
Save jaredcacurak/841620 to your computer and use it in GitHub Desktop.
A Groovy solution for Project Euler - Problem 9
// 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