prob_25 ruby solve