problem2

problem2 ruby