LOGIC GOES OVER MY HEAD!

Unable to understand how loop is working and there is confusion that if loop runs for p number of times how can ans only be one , i am confused help me out sir !

hello @piyushkumar999999

pls mention the code ,that u want me to explain

Hey @piyushkumar999999
Please share your code :slight_smile:

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.