Prime Prasad
CodeChefOpen on judge ↗
Spiritual Prasad is organising a bhandara (religious treat) for his friends and family. He wants to offer laddus to everyone. But he believes in luck and karma and hence he won't give equal laddus to everyone. Also since his mathematician friend Little Bajju is funding the event, he wants that the number of laddus each person gets has to be a prime number. Prasad has invited 'n' people and there
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