Skip to content

Instantly share code, notes, and snippets.

@iwazer
Created April 29, 2011 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iwazer/49932b6eb52bcd160e9c to your computer and use it in GitHub Desktop.
Save iwazer/49932b6eb52bcd160e9c to your computer and use it in GitHub Desktop.
Problem 20 - Project Euler
puts (2..100).to_a.inject(1){|muls,v| muls * v}.to_s.split('').inject(0){|sum,v| sum + v.to_i}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment