Count Number of BInary Strings. Two test cases are failing

Two test caes are failing. https://ide.codingblocks.com/s/102135

Hi @S19APP-PP0086
This problem requires some precomputation. If you look closely you will find that there’s some kind of pattern being formed with the testcases… some kind of series. Look closely.
Note down the answers for different values of n from 1 to 10 , that should be enough. Just take a look and try to form a pattern. You will be able to catch it faster than you realise. After that precompute the answers for that series upto 90 ( 1<=n<=90 as per question) in an array , say A.

Use long long int datatype or it won’t work .

Then run the loop for testcases and simply output the value at A[n] for each input of n.

Once you are done with this question , try to think of the reason why this particular pattern was occuring here. Let me know if you need help with that.

I understand this reply might not seem much helpful but just take the look at the testcases … the answer’s right in front of you.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.