solved problem 41 again in ruby