I'm getting an output of 'wrong answer'

What could be wrong with this piece of code? CodeChef: Practical coding for everyone This is a solution for the Word counting problem.
Problem details - WCOUNT Problem - CodeChef

1 Like

i don’t know what went wrong, as i didn’t go through your code. But you can simply solve this by calculating factorial(N)/ (factorial(R1)* factorial(R2)…)
where N --> total number of alphabets in the input
R --> number of repeats of each alphabet.

After seeing your output, i guess you are not doing the division part {division by the number of times alphabets repeated}. hope you get it right now.