Pregunta de entrevista de IoT Inspector

Write a digit parser with error tolerance supporting different bases.