Prateek Loves Candy

Code not passing any testcase bu is running properly with example given in question.
code…

You are required to use prime seive optimisation in your code. Refer to the video given under number theory section on the same and then try to implement that logic only…