Skip to content

Instantly share code, notes, and snippets.

View EremeykinS's full-sized avatar
☢️

Sergey Eremeykin EremeykinS

☢️
  • Tbilisi
View GitHub Profile
@EremeykinS
EremeykinS / ack_short.py
Created October 8, 2015 21:50 — forked from justjkk/ack_short.py
Ackermann Function in python
import sys
count=0
sys.setrecursionlimit(50000)
cache={}
def a(m,n):
global count
global cache
count=count+1
if cache.has_key(m) and cache[m].has_key(n):
return cache[m][n]