← All problemsSign in

CHRISTMAS EVE

On the day of Christmas, when everyone is busy celebrating, but suddenly $N$ aliens come on Earth and each alien demands a unique positive number $(number>0)$ from Santa. Everyone is afraid to see the aliens on earth. So, Santa wants the aliens to go back from earth, and the only way for the aliens to go back is that the GCD of the numbers (given by Santa to aliens) of every possible pair of al

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start