add Solution 1-3 in Ruby