C - Toms Collections
CodeChefOpen on judge ↗
Tom has a hobby of collecting old coins, he has been collecting old coins since he was a kitten. When his collection reaches a number which is prime he receives an equivalent amount of chocolates from his owner as a gift (eg: when tom will collect 13 coins he will receive 13 chocolates from his owner). You are given the number of old coins tom currently has, you need to determine the total
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