Skip to content

Instantly share code, notes, and snippets.

@lune-sta
Created August 18, 2012 23:47
Show Gist options
  • Select an option

  • Save lune-sta/3390390 to your computer and use it in GitHub Desktop.

Select an option

Save lune-sta/3390390 to your computer and use it in GitHub Desktop.
Project Euler 30
p (0..999999).select{|a|a == a.to_s.split(//).map{|a|a.to_i**5}.inject{|a,b|a+b}}.inject{|a,b|a+b}-1 # 443839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment