QUEST OF DIVISORS
CodeChefOpen on judge ↗
Sagar has decided to challenge Shivam, he gives him an array of N integers and both of them have to perform a Task one by one. Task given by Sagar is that a player has to choose any 2 numbers from the given array ai and aj (i!=j) such that ai * aj has exactly 3 positive divisors and delete those 2 elements from the array. Both the players play alternatively. If there are no possible moves then p
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