25May/094
Project Euler: Problem 20 in Ruby
I cheesed out on this one, pretty much just did what the problem called for. No magic. Looking through the forums, however, it was pretty much par for the course.
Find the sum of the digits in the number 100!
product, sum = 1, 0 100.times do |i| product *= i + 1 end while product > 0 sum += (product /= 10) % 10 end puts sum




























October 31st, 2010 - 04:21
my wireless router at home overheated when i used p2p heavily for 24 hours for the next 25 days “
November 22nd, 2010 - 05:36
wireless routers are very necessary nowadays because we do not want so many wires running around the home ;::
January 24th, 2011 - 16:20
‘-: I am very thankful to this topic because it really gives useful information “.-
January 25th, 2011 - 01:36
‘:, I am really thankful to this topic because it really gives great information ~-”