Getting parial submission


the question link is inside the editor

@pks101295
your code is giving wrong ans for n=1.
Output should be:
0
1
1
but your code is giving
0
1
just change line no 22 to for (int i = 0; i <= n+1; i++)
all testcase would pass

done! Thanks!!! :grinning: :grinning: :grinning:

@pks101295
please mark this doubt as resolved.

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.