Skip to content

Instantly share code, notes, and snippets.

@jaredcacurak
Created February 24, 2011 02:13
Show Gist options
  • Save jaredcacurak/841623 to your computer and use it in GitHub Desktop.
Save jaredcacurak/841623 to your computer and use it in GitHub Desktop.
A Groovy solution for Project Euler - Problem 48
​String sumOfPowers = (1..1000).inject(0) { sum, it ->
sum += it ** it
}
sumOfPowers[-10..-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment