您的程式被監控系統中斷,可能是程式無法正常結束所導致。
Traceback (most recent call last):
File "/10167037/code_10167037.py", line 14, in
ans = re(number)
File "/10167037/code_10167037.py", line 9, in re
return re(n-1) + op(n-1)
File "/10167037/code_10167037.py", line 9, in re
return re(n-1) + op(n-1)
File "/10167037/code_10167037.py", line 9, in re
return re(n-1) + op(n-1)
[Previous line repeated 995 more times]
File "/10167037/code_10167037.py", line 5, in re
if n == 0:
RecursionError: maximum recursion depth exceeded in comparison
似乎是遞迴太多次了,直接用公式解吧