fork download
  1. def akk(m, n):
  2. if m == 0:
  3. n += 1
  4. return n
  5. elif m > 0 and n == 0:
  6. print(m, n)
  7. return akk(m - 1, 1)
  8. else:
  9. return akk(m - 1, akk(m, n - 1))
  10.  
  11.  
  12. print(akk(3, 4))
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
3 0
2 0
1 0
1 0
2 0
1 0
1 0
1 0
1 0
1 0
1 0
2 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
2 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
2 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
125