Can you pls check the code,its showing time limit exceeded

@dipeshpandey2001
you have a typing error at line 11 of your code i guess you wanted to write p[j]=0.
and use long long int for variable i in for loop at line 8 too.

still not working ,pls check https://ide.codingblocks.com/s/489714

can you pls check it?

hello?>…

Your code is working fine and getting AC with me.try submitting it again.

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.