[1, 3, 5, 9, 17, 33, 65, 129, 257, 513]
xs = [
repr(int()),
repr(repr(int())),
repr(repr(repr(int()))),
repr(repr(repr(repr(int())))),
repr(repr(repr(repr(repr(int()))))),
repr(repr(repr(repr(repr(repr(int())))))),
repr(repr(repr(repr(repr(repr(repr(int()))))))),
repr(repr(repr(repr(repr(repr(repr(repr(int())))))))),
repr(repr(repr(repr(repr(repr(repr(repr(repr(int()))))))))),
repr(repr(repr(repr(repr(repr(repr(repr(repr(repr(int()))))))))))
]
def make(n):
s = ""
for x in reversed(xs):
l = len(x)
if n >= l:
s += x
n -= l
print(len(s))
return s
ys = [
"repr(int())",
"repr(repr(int()))",
"repr(repr(repr(int())))",
"repr(repr(repr(repr(int()))))",
"repr(repr(repr(repr(repr(int())))))",
"repr(repr(repr(repr(repr(repr(int()))))))",
"repr(repr(repr(repr(repr(repr(repr(int())))))))",
"repr(repr(repr(repr(repr(repr(repr(repr(int()))))))))",
"repr(repr(repr(repr(repr(repr(repr(repr(repr(int())))))))))",
"repr(repr(repr(repr(repr(repr(repr(repr(repr(repr(int()))))))))))"
]
print([len(x) for x in xs])
e = 'f{'+ys[0]+"}"
two = len(repr(list))
print("two :", two, repr(list()))
print(ys[0], len(ys[0]), len(str()))
def _make(n):
return str().join("len(repr(int()))" if c == '0' else "len(str())" for c in bin(n)[2:])
print(_make(13))
import builtins
# 1) choose your zero-arg seeds
seeds = {
'int()' : int(),
'float()' : float(),
'complex()' : complex(),
'bytes()' : bytes(),
'bytearray()' : bytearray(),
'dict()' : {},
'list()' : [],
'tuple()' : (),
'set()' : set(),
'frozenset()' : frozenset(),
'range()' : range(0),
'object()' : object(),
'globals' : globals,
'locals()' : locals,
'len' : len,
}
# 2) BFS/nested search up to depth D
from collections import deque
D = 12
expr_for_value = {}
queue = deque((name, seeds[name], 1) for name in seeds)
while queue:
expr, value, depth = queue.popleft()
v = len(repr(value))
# record first time we see this integer
if v not in expr_for_value:
expr_for_value[v] = f"len(repr({expr}))"
if len(expr_for_value) >= 1000:
break
# if we can still go deeper, nest one more repr
if depth < D:
queue.append((f"repr({expr})", repr(value), depth+1))
# 3) now expr_for_value[n] is your magic one‐liner for each 1 ≤ n ≤ 1000
print([k for k in range(1,1000) if not k in expr_for_value])
print(expr_for_value[42]) # e.g. something like "len(repr(repr(repr(len))))"
To embed this program on your website, copy the following code and paste it into your website's HTML: