This is from a previous question paper for an entrance exam I am preparing for. https://www.allen.ac.in/apps/exam-2014/jee-advanced-2014/pdf/JEE-Main-Advanced-P-I-Maths-Paper-with-solution.pdf (Link for the paper. The question number is $56$).
I wanted to solve this question using star-bars method. My idea was that after finding number of all possible combinations (that is coming out to be $n-1\choose r-1$ = $20-1\choose 5-1$) I would divide the answer by $5!$ as every solution that allows for a