I tried to solve Deepak and Primes II problem but I am getting wrong answer on submission please tell me what is the error. code is giving correct output for given test cases.
code link : https://ide.codingblocks.com/s/161725
Deepak and Primes II
You should take care of small things like you are making ar[N] and then trying to access ar[N].
Please see your code carefully and remove errors.
Have a look at this code
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.
why are you doing this
why are you doing this long long first=ceil(a/double(num))*num; for(long long j=first;j<=b;j+=prime[i])