# Pastebin IbFavOK0 def mk(x): def f(a, *, b=x): return a + b return f def main(): res = 0 for i in range(1000000): res += mk(i)(-i) return res main()