Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
4 lines (2 sloc) 117 Bytes
LIMIT = (ARGV[0] || 100).to_i
puts (1..LIMIT).inject(:*).to_s.chars.inject(0) { |sum, element| sum + element.to_i }