← All problemsSign in

Shinigami and Apples

"This world is rotten. The rotten should die." - Kira. You have "N" shinigamis and "M" apples. You need to give a positive number of apples to every shinigami and also make sure that every shinigami receives a distinct number of apples. Find out the number of ways in which you can distribute all M apples. Two ways are same if every shinigami gets the same number of apples. Input The first line

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