Binomial Coefficient, how to deal with large values

Here is my code for binomial coefficient, I am getting wa for some cases. How do I deal with larger values and use mod?

whenever you multiply or add or subract , just give mod …
a+b = (a+b)%mod

Okay Bhaiya, Thank you!

Bhaiya I am still getting wa on multiple test cases