Prime Vs Composite
CodeChefOpen on judge ↗
Neel and Manju are competing with each other to win Gula-Gula candies. Neel likes prime number whereas Manju is fond of composite numbers. Let X denote Neel's strength, which is equal to sum of prime numbers and Y denote Manju's strength, which is equal to sum of composite numbers. One with the higher strength gets a packet of candies. Initially they have an array consisting of N numbers and at
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