0
How to count function calls?
I want to count the function calls of the Ackermann function: def A (m,n,s="%s): print (s% ("A (%d,%d)" % (m,n))) if m==0: return n+1 if n==0: return A (m-1, 1, s) n2= A (m,n-1,s% ("A (%d,%%s)" % (m-1))) return A (m-1,n2,s) print (A (2,2))
1 ответ
+ 1
The function looks incorrect when I paste into the editor. Please refer to StackOverflow at https://stackoverflow.com/questions/23047680/find-number-of-times-ackerman-function-is-called-in-JUMP_LINK__&&__python__&&__JUMP_LINK