Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/E869120/math-algorithm-book
/ division
Function
division
codes/python/Code_5_07_2.py:12–13 ·
view source on GitHub ↗
(a, b, m)
Source
from the content-addressed store, hash-verified
10
11
# division(a, b, m) は a÷b mod m を返す関数
12
def
division(a, b, m):
13
return
(a * modpow(b, m - 2, m)) % m
14
15
# ncr は n! を r! × (n-r)! で割った値
16
def
ncr(n, r):
Callers
1
ncr
Function · 0.70
Calls
1
modpow
Function · 0.70
Tested by
no test coverage detected