Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/E869120/math-algorithm-book
/ ncr
Function
ncr
codes/python/Code_5_07_2.py:16–18 ·
view source on GitHub ↗
(n, r)
Source
from the content-addressed store, hash-verified
14
15
# ncr は n! を r! × (n-r)! で割った値
16
def
ncr(n, r):
17
global fact, MOD
18
return
division(fact[n], fact[r] * fact[n - r] % MOD, MOD)
19
20
MOD = 1000000007
21
LIMIT = 200000
Callers
1
Code_5_07_2.py
File · 0.70
Calls
1
division
Function · 0.70
Tested by
no test coverage detected