complete Euler 6

written in Ruby. functions and some string formatting.