Answer is coming out to be correct but the test cases are not pssing can u please check why

You need to use long long int in your code

long long int countStrings(int n)
{
long long int a[n+1], b[n+1];

a[1] = b[1] = 1; 
for (int i = 2; i <= n; i++) 
{ 
    a[i] = a[i-1] + b[i-1]; 
    b[i] = a[i-1]; 
} 
return a[n] + b[n]; 

}