Your task is to write a program, function or snippet (yes, snippets are allowed) that simply outputs an integer. However, you must be able to separate your submission into prefixes that also produce distinct integers. You cannot use any bytes that have appeared in previous prefixes. For example, we can have the prefixes:
1 # 1 (Now we can't use 1)
1-6 # -5 (Now we can't use - or 6)
1-6/3 # -1 (Now we can't use / or 3)
1-6/3+0xA # 9 Final submission
Rules
- Your goal is to create to try and create the most unique integers, while keeping them close to zero.
- The scoring system is
((number of unique integers)**3)/(sum of absolute values)
, where the higher your score, the better. The above example scores \$(4^3)/(1+\lvert-5\rvert+\lvert-1\rvert+9) = 64/16 = 4\$.
- The scoring system is
- There should be at least two unique integers (no dividing by zero!)
- Please format your answer similar to:
# Language, \$(4^{3})/16 = 4\$
1-6/3+0xA (the full program)
- Mention if your submission is composed of snippets that evaluate to a value, functions or full programs.
- List each of the prefixes and (optionally) an explanation for how they work.
print 123-len(open(__file__).read())
followed by#
then one of each byte not used so far (except some control characters), with prefixes chopping those bytes. Adjust 123 to whatever centers the range of outputs around 0. For a better score, the non-comment part of the program can be rewritten using only the 7 distinct characters that are universal for Python. Is this all valid? \$\endgroup\$