it is passing one test case. it is logically correct and is working fine for small value but giving negative values for large values. i think it is showing wrong due to mod.please check the error and how to resolve it.
Showing wrong ans in 2 test cases
Please send your code link.
Use long long int and pass all the test cases
changed int to long long int but it is still showing error
You don’t need to repost the doubt again and again after every reply.
You have to print this : ans=zeroes[n-1]+ones[n-1]
Why multiplying it with 2 ?
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.