ncr for large N ( n<=1e9)

Revision en2, by silent__killer1, 2019-06-23 01:21:27

Hi ,I need to compute ncr for (n) from 1<=n<=1e9 where (n-r) are from 1<=n-r<=1e6 . Mod 1e9+7.I googling about this and get to know that this could be done by (lucas theorem) I try to implement but fails . So if anyone could help me in this it would be grateful.And please share your code for this.Thankyou.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English silent__killer1 2019-06-23 01:21:27 6 Tiny change: 'm 1<=n<=1e18 where (n-' -> 'm 1<=n<=1e9 where (n-'
en1 English silent__killer1 2019-06-23 01:16:54 334 Initial revision (published)