new files
This commit is contained in:
parent
3af7344581
commit
86c034bb8b
1364 changed files with 21352 additions and 0 deletions
7
Task/Ackermann-function/Python/ackermann-function-2.py
Normal file
7
Task/Ackermann-function/Python/ackermann-function-2.py
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
def ack2(M, N):
|
||||
if M == 0:
|
||||
return N + 1
|
||||
elif N == 0:
|
||||
return ack1(M - 1, 1)
|
||||
else:
|
||||
return ack1(M - 1, ack1(M, N - 1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue