I have changed my num to 1000005 but still exceeding tle…The prime number is checked by sieve optimised method.
Prateek loves candy tle
@piyush.bansal8158625 hey piyush this problem is more complex than deepak and prime this need this kind of implementation
prateek love candy