2 ms·
Wrong output. What you call "code golf" is the essence of the natural sciences: Inducing natural laws from the data generated by those natural laws. In this
by jabowery 3y ago
Wrong output.
What you call "code golf" is the essence of the natural sciences:
Inducing natural laws from the data generated by those natural laws. In this case, the universe to be modeled was generated by:
print(‘’.join([f’{xint:0{5}b}’ for xint in range(32)]))
- arp242 3y agoOh 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.