solved problem 48 again in ruby