Domanda di colloquio di Pinterest

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