Gaurang And His Students
CodeChefOpen on judge ↗
Gaurang is very fond of cricket so he opened a cricket academy to train newbies. Every student in the academy selects his own jersey number. But as Gaurang is a maths wizard, he wants the GCD of jersey numbers of all students should be greater than 1. Gaurang wants to change some jersey numbers such that the GCD of all jersey numbers becomes greater than 1. So you have to tell Gaurang the minimum
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