ruby solution to the 'big ints' problem