diff options
Diffstat (limited to 'benchmark/other-lang/tak.py')
-rw-r--r-- | benchmark/other-lang/tak.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/benchmark/other-lang/tak.py b/benchmark/other-lang/tak.py index 9b7bd8f23..04f3f6829 100644 --- a/benchmark/other-lang/tak.py +++ b/benchmark/other-lang/tak.py @@ -1,8 +1,8 @@ -def tak(x, y, z):
- if not(y<x):
- return z
- else:
- return tak(tak(x-1, y, z),
- tak(y-1, z, x),
- tak(z-1, x, y))
-tak(18, 9, 0)
+def tak(x, y, z): + if not(y<x): + return z + else: + return tak(tak(x-1, y, z), + tak(y-1, z, x), + tak(z-1, x, y)) +tak(18, 9, 0) |