Virat and ncr-NUMBER THEORY

i am calculating the common inverse part seperately…not able to find where i am wrong…passed only 1/7 test cases.
my code:https://ide.codingblocks.com/s/190096

question:

Virat is learning to calculate nCr. Dhoni gave him some n and r values to solve for nCr. As the result can be large, he asked him to print (nCr % 1000000007).

@kumar_sunny
You defined the modulo wrong
See this once https://ide.codingblocks.com/s/190116

If your doubt is resolved please mark it as closed.