(n, r, MOD)
| 109 | return res |
| 110 | |
| 111 | def nCr(n, r, MOD): |
| 112 | global fac_warm_up, factorial_modP |
| 113 | if not fac_warm_up: |
| 114 | warm_up_fac(MOD) |
| 115 | fac_warm_up = True |
| 116 | return (factorial_modP[n] * ( |
| 117 | (pow(factorial_modP[r], MOD - 2, MOD) * pow(factorial_modP[n - r], MOD - 2, MOD)) % MOD)) % MOD |
| 118 | |
| 119 | |
| 120 | def test_print(*args): |
nothing calls this directly
no test coverage detected