Pergunta de entrevista da empresa IoT Inspector

Write a digit parser with error tolerance supporting different bases.