Coprime
CodeChefOpen on judge ↗
Recently Kate learned about co-prime numbers. So for her practice Jamie used to give her an integer everyday and asked Kate to find an integer which is the non-even smallest integer greater than the given integer such that both of the numbers are co-prime. Kate got well in finding the next cop-prime number, but being her friend you decided to ask her to teach you as well. So now she gave you one n
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start