Problem in condition! For admins.
In the first string of condition: "For example, 2^2−1 — the first Mersenne prime".
So, the first Mersenne prime is 2^2-1 = 3.
Then, in the sample we read:
18 - 3217
But, if so, the first Mersenne prime is 2, not 3, so, for the test
1
1
the program should output 2, not 3.