Pergunta de entrevista da empresa Pinterest

Question about truncating a number representation with some basic logic using strings and loops