Solution 150 treating integers as sequences of digits