Solutions for Timus Online Judge Problems, in Ruby