← All problemsSign in

Packing Candies

It’s Halloween. Papa Smurf has received a lot of orders of candies. One day, while packing candies, he counted number of different ways he can pack candies in a box. Two ways are different if there exists a candy type for which its count in resulting boxes is different. Box has a property that they can contain only a fixed number of candies, neither less nor more. If Papa has three types for cand

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