Processing math: 100%

Problem #125

Happy String

You are given p a's and q b's. You arrange them in the form of a string. If you are able to get a string in which as you move from left to right, the number of a's is strictly greater than b, then it is known as a happy string.

Let the number of such happy strings be denoted by happy(p,q), then find happy(200,100) * 201! * (101!/300!).

Contributed by Harkirat Singh

Solved by 64 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.