Time limit: 3 sec
Solve an easy problem. I will give you a word and your task is to generate maximum of your own word by using the letter of the given word. It is not necessary that the generated word will be a dictionary word. Suppose the given word is “mac”. You can rearrange it in 5 ways (“mca”, “cma”, “cam”, “amc”, “acm”).
Input and Output:
Input contest of a sequence of lower case letter not more than 13 characters.
Output will be an integer the total number of rearranged word.
August Contest, 2014
Problem Setter: Mehadi Hossain