Magnet Power
CodeChefOpen on judge ↗
Prof. Virus has developed a special kind of magnet that oppose the odd number and attracts even number. The magnet has special kind of property that higher the number that feel more attraction or repulsion as compare to lower number. for example number 4 will be more attracted than number 2 and number 3 will be more opposed than number 1. In the presences of the magnet, the numbers of the ar
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