r18455 reverted.
[ruby-svn.git] / benchmark / other-lang / ack.py
blob9968e7cfcf76a0aa9d3365a31f46468288bd3bde
1 import sys
2 sys.setrecursionlimit(5000000)
4 def Ack(M, N):
5 if (not M):
6 return( N + 1 )
7 if (not N):
8 return( Ack(M-1, 1) )
9 return( Ack(M-1, Ack(M, N-1)) )
11 def main():
12 NUM = 9
13 sys.setrecursionlimit(10000)
14 Ack(3, NUM)
16 main()