diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2021-10-24 23:04:45 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2021-10-24 23:04:45 +0900 |
| commit | 787dc13c837f0955fbd85b8f26a05d720d361333 (patch) | |
| tree | fec3abebb1e867e8b2239d7cf07b4c7d13ce0f81 /comparison/Python/ack3-11.py | |
| parent | e607a57dfafb784c4e27da143214afb2ccd07fbf (diff) | |
| download | inpla-787dc13c837f0955fbd85b8f26a05d720d361333.tar.gz inpla-787dc13c837f0955fbd85b8f26a05d720d361333.zip | |
Upload the comparison directory
Diffstat (limited to '')
| -rw-r--r-- | comparison/Python/ack3-11.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/comparison/Python/ack3-11.py b/comparison/Python/ack3-11.py new file mode 100644 index 0000000..3e831ac --- /dev/null +++ b/comparison/Python/ack3-11.py @@ -0,0 +1,9 @@ +def ack(m,n): + if m==0: + return n+1 + elif n==0: + return ack(m-1, 1) + else: + return ack(m-1, ack(m, n-1)) + +print(ack(3,11)) |
