2 ms·
Oh right, you need the leading zeroes won't get printed; need a formatting string with a specific width for that. I don't do much Python so I don't recall the e
by arp242 3y ago
Oh right, you need the leading zeroes won't get printed; need a formatting string with a specific width for that. I don't do much Python so I don't recall the exact syntax off-hand, but the point was: there is an obvious way to compact the number that can be done without any analysis of the number itself (or even looking at it, for that matter).
While print(literal) is "cheating" if you ask for "create a program that generates ...", it is a very obvious thing to do if you want to go down that route.