Fair Denominations
CodeChefOpen on judge ↗
At the Diwali Fair, Chef wants to purchases some goods for the Rasode. All the goods cost him $N$ rupees. Chef wants to find out which denominations he can use to pay $N$ rupees if he wants to use only a single type of denomination to pay $N$ rupees. For eg., if he has to pay $10$ rupees then he can use either '$10$ coins of $1$ Rupee' or '$5$ coins of $2$ rupees' or '$2$ coins of $5$ rupees' or '
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