Virat and ncr problem

anyone figure out what i am going wrong.
following logic implemented
ans = n!*inverse(r!)*inverse(n-r!)

Logic is fine. There is some error in the implementation. Your code is generating weird answer for sample input.
Please have a look at this short code to refer.

i had fixed my code there was mistake in expo(…) function.
thanks @Jun18APP0015

Awesome! @rajujnvgupta
You may close the thread if the doubt has been resolved. Please give a rating :smile:

1 Like

how to close the thread i don’t know. please tell me steps.
@Jun18APP0015

Through “Ask Doubt” option --> Unresolved --> mark resolved :slight_smile:

1 Like

awesome ! @Jun18APP0015