final version of euler20 in ruby