fork(2) download
  1. # your code goes here
  2. def funcao(lista,x):
  3. if len(lista) == 0:
  4. return 0
  5. qtd = 1 if lista[0] > x else 0
  6. return qtd + funcao(lista[1:],x)
  7.  
  8. print(funcao(list(range(1000)), 3)) # 2
Runtime error #stdin #stdout #stderr 0.14s 28132KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 8, in <module>
  File "./prog.py", line 6, in funcao
  File "./prog.py", line 6, in funcao
  File "./prog.py", line 6, in funcao
  [Previous line repeated 995 more times]
  File "./prog.py", line 3, in funcao
RecursionError: maximum recursion depth exceeded while calling a Python object