Help needed in this problemanyone please Help!
Difference between en4 and en5, changed 34 character(s)
Hi everyone I was solving [this problem](https://www.hackerrank.com/contests/goc-cdc-series-7/challenges/different-chocolates/problem). I tried a lot for finding a general formula for — How many permutation out of $n!$ will lead to exactly $K$ different chocolates. Then we just have to find probability by dividing with $n!$ and find Expectation by multiplying with $K$ and finally add the expectation for all such $K$ in range $[1,N]$.↵
But I am unable to find a general formula for this. Also I am not able to get the editorial basically proof of that.                               ↵
Can anyone please provide some idea regarding this. It'll be of great help.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English Trgt_2021_explosion 2020-08-13 12:40:52 34
en4 English Trgt_2021_explosion 2020-08-13 12:40:08 24 Tiny change: ' editorial. ' -> ' editorial basically proof of that. '
en3 English Trgt_2021_explosion 2020-08-13 07:48:51 2 Tiny change: 'range $[1,K]$.\nBut I' -> 'range $[1,N]$.\nBut I'
en2 English Trgt_2021_explosion 2020-08-13 07:47:51 66
en1 English Trgt_2021_explosion 2020-08-13 07:45:24 606 Initial revision (published)