← All problemsSign in

Making Change

CodeChefRating 3212Open on judge ↗

Chef recently visited a strange land with strange currency. One day Chef needed to make change to pay for an item with coins, and wondered how many ways it could be done, assuming an infinite supply of each type of coins. Two ways are considered different if there is some coin that appears a different number of times in each sum. The answer may be very large, so Chef only needs to know the remaind

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start