fork download
  1. def akk(m, n):
  2. if m == 0:
  3. n = n + 1
  4. return (m, n)
  5. elif m > 0 and n == 0:
  6. akk(m-1, 1)
  7. return (m, n)
  8. else:
  9. akk(m - 1, akk(m, n-1))
  10. return (m, n)
  11.  
  12. akk(2, 2)# your code goes here
Runtime error #stdin #stdout #stderr 0.02s 9984KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 12, in <module>
  File "./prog.py", line 9, in akk
  File "./prog.py", line 9, in akk
  File "./prog.py", line 6, in akk
  File "./prog.py", line 9, in akk
  File "./prog.py", line 3, in akk
TypeError: can only concatenate tuple (not "int") to tuple