import time import sys sys.setrecursionlimit(10000000) def ack(x,y): global z z+=1 if x==0: return y+1 elif y==0: return ack(x-1,1) else: return ack(x-1,ack(x,y-1)) z=0 m=int(input("m = " )) n=int(input("n = " )) start = time.time() y = ack(m,n) end = time.time() print('ack(',repr(m).rjust(2),',',repr(n).rjust(2),') =',repr(y).rjust(9),' # Aufrufe =',repr(z).rjust(10),' Zeitaufwand: {:7.3f} s'.format(end-start))