please help
I couldn't just pass the first test case
instead of iterating over p for each test case, make an array such that ith index of array corresponds to ith prime number, so you’d be able to answer each query in O(1) instead of O(n)
I did that still it was showing some error
Check this out.I did that method
Bro check please ASAP
it is passing all the test cases
Bro it isn’t. Please check and revert back
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.