Can anyone check the testcases where this code might fail as I did try with random numbers and it gives the right answer.
P-POTATOES Problem - CodeChef
CodeChef: Practical coding for everyone
Your program prints nothing for the testcase
1
1000 327
The next prime is 1361, so it should print 34.
1 Like
Got it, thanks!