Why this is giving 33.33 right?

This is my question
https://hack.codingblocks.com/app/practice/3/1039/problem

This is my code.

hello @dhruvilcodes

becuase the time complexty of ur code is high.
precompute the count of prime numbers in some array and then use that array to answer efficiently.
refer this for more detail->

1 Like

thank you so much , you are very good doubt solver!!!

1 Like

then do write the same in feedback form​:sweat_smile::sweat_smile:

1 Like

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.