Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
import sys
sys.setrecursionlimit(1025)
def a(in_k, x1, x2, x3, x4, x5):
k = [in_k]
def b():
k[0] -= 1
return a(k[0], b, x1, x2, x3, x4)
return x4() + x5() if k[0] <= 0 else b()
x = lambda i: lambda: i
print(a(10, x(1), x(-1), x(-1), x(1), x(0)))

View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
import sys
sys.setrecursionlimit(1025)
def a(k, x1, x2, x3, x4, x5):
def b():
b.k -= 1
return a(b.k, b, x1, x2, x3, x4)
b.k = k
return x4() + x5() if b.k <= 0 else b()
x = lambda i: lambda: i
print(a(10, x(1), x(-1), x(-1), x(1), x(0)))

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python
import sys
sys.setrecursionlimit(1025)
def A(k, x1, x2, x3, x4, x5):
def B():
nonlocal k
k -= 1
return A(k, B, x1, x2, x3, x4)
return x4() + x5() if k <= 0 else B()
print(A(10, lambda: 1, lambda: -1, lambda: -1, lambda: 1, lambda: 0))