Regarding time complexity

t is range of 1000 and searching in seive in worst case is of 100000
so it should give TLE but its not giving in this problem but in prime visits its giving TLE

@deepakjumani09 bro is case me test cases chote dalein honge thats why it is working ,jisme tle arha usme bde integers honge to segmented seive krlena.

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.

@deepakjumani09 i see you have re-opened your doubt. Can I help you with anything?

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.