← All problemsSign in

Talia and Chocolates

As you know, Talia loves chocolates. So, she went to a shop and bought $K$ chocolates. Talia wants to hide all her chocolates so that she does not have to share them with her friends. Now, Talia is wondering, in how many ways she can put $K$ chocolates in $N$ pockets which are on her jacket. A pocket can contain all the $K$ chocolates or can be empty. **Note:** All the chocolates are identical b

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