Getting error in test case 5 and test case 6

#include
using namespace std;
#define mod 1000000007
int main() {
int n;
cin>>n;
int dp[n+1];
dp[0]=1;
dp[1]=1;
for(int i=2;i<n+1;i++){
dp[i]=(dp[i-1]+dp[i-2])%mod;
}
cout<<dp[n];
return 0;
}
What is wrong in my code it shows on a test case 5 and a test case 6?

hi @pranjal123 what error are you facing? Also please share your code using CB IDE

My code shows TLE for test cases 5 and 6.

@pranjal123 please share your code using CB IDE