In Problem E I got a wrong answer on this test:
Input
1
2
2137 333979
Output
2137
My answer is -1, and I couldn't understand why 2137 is a valid solution knowing that 2137 is prime and 331 * 1009 = 333979.
I appreciate it if someone could give me a good explanation for this test.
Auto comment: topic has been updated by Kakita (previous revision, new revision, compare).
Where did you find this test?
I did find it in test 3, and if you use their solution in the tutorial, you will get the same result.
add 2137 and then step by +2 until it's 331x, then by +331.
THank you so much.