Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这可能以前被问过,但我看到的答案都没有对我有用。我尝试了卢卡斯定理,费马定理,但都没有奏效。是否有一种有效的方法来找到以下值:
nCr mod 10^9+7 where n<=10^9 and r<=1000
任何帮助都会非常有用
n 大而 r 小,最好通过 n(n-1)...(n-r+1)/(1*2*...*r) 计算 nCr
您可能需要找到 1, 2, ... r mod 10^9+7 的乘逆