Although I got 100 marks by a liitle bit different solution but

I didn’t get why it gives wrong answer for n>0.5…if I put n=0.5 it gives correct 3…and when I put n=1 it gives just 153…please do compare it with my 100 marks submission…there is difference in only 2 lines…

Well i believe you can pass all test cases just by directly using the direct formula:
ceil(sqrt(1.02365*log(1/(1-p))))

I didn’t know about the formulae …so this was the method on which I can rely on…so I just need to know the reason what went wrong…

Sorrt for a delayed response.
Well, i think we need to print exclusively for input 1. Rest it could be done with other way as well.
I cant see your code until you share it wth ide link.

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.