Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.
Two numbers are relatively prime or co-prime if their greatest common divisor is .
In this problem, you will be given an integer , you will have to find out the the smallest number , so that and are relatively prime.
The only line will have one input
In one line, print the desired result.
Input | Output |
---|---|
1 | 2 |
Login to submit
If an integer NNN is divisible by xxx, then N+xN + xN+x is also divisible by xxx. If we want to find...