ruby solution for Decomposing numbers into sum of repdigits