Alan the Pokemon Master
CodeChefOpen on judge ↗
Alan has set out on a journey to become the greatest Pokemon master. To get his first Pokemon, he went to Professor Turing's Lab. Since Alan is Professor Turing's favourite student, Turing allows him to take as many Pokemon from his lab as he pleases. But Turing warns him that a group of k > 1 Pokemon with strengths {s1, s2, s3, ..., sk} tend to fight among each other if gcd(s1, s2, s3, ..., sk
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