Hard
Debug Python Script
Identify and fix logic errors in a provided Python script.
📝 プロンプトの内容
Here is a Python script that is supposed to calculate the fibonacci sequence recursively but crashes on inputs greater than 20. Identify the issue, rewrite the function to handle larger inputs efficiently, and explain the bug.