Added Problem 27 in Ruby