[Solution] Factorise N+M Codeforces Solution
Pak Chanek has a prime number . Find a prime number such that is not prime.
A prime number is a number with exactly factors. The first few prime numbers are . In particular, is not a prime number.
Each test contains multiple test cases. The first line contains an integer () — the number of test cases. The following lines contain the description of each test case.
The only line of each test case contains a prime number ().
For each test case, output a line containing a prime number () such that is not prime. It can be proven that under the constraints of the problem, such always exists.
If there are multiple solutions, you can output any of them.
In the first test case, , which is prime, and , which is not prime.
In the second test case, , which is prime, and , which is not prime.
In the third test case, , which is prime, and , which is not prime.
No comments:
Post a Comment