Skip to content

Instantly share code, notes, and snippets.

@jaredcacurak
Created January 25, 2011 22:37
Show Gist options
  • Save jaredcacurak/795848 to your computer and use it in GitHub Desktop.
Save jaredcacurak/795848 to your computer and use it in GitHub Desktop.
A Groovy solution for Project Euler - Problem 63
(1..100).inject 0, { total, base ->
(1..100).each { power ->
String number = base ** power
if (power == number.size()) { total += 1 }
}
total
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment