My Project Euler answers in Ruby