Tweak the GCD
CodeChefOpen on judge ↗
Chef has always been attracted towards GCD of numbers. His friend Chefa gave him an array of n positive integers and asked him to remove some integers from the array so that the resulting GCD of the new array is bigger than the current value of GCD. Since chef is busy preparing new recipes, please help him in solving the above problem. Input - The first line contains an integer n denoting the si
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