Number problems solved in ruby