Christmas Factor
CodeChefOpen on judge ↗
Christmas is finally here! Since the children have been stuck in their homes for the past two years, Santa Claus decided to play a fun game with them. Santa will give the children $N$ integers $A_1,A_2,...,A_N$ and the children have to find the smallest positive number greater than 1 such that the $GCD$ of that number with each of the $N$ integers is $1$. $GCD$ of two positive integers $a$ and
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