Finding binomial coefficient with big n, k and mod

Revision en1, by astrothegod, 2022-01-19 09:45:02

The problem is calculate nCk with n <= 10^18, k <= 10^6 and mod = 10^9 + 7. Can anyone give me some hints or pesudo code. Thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English astrothegod 2022-01-19 09:45:02 178 Initial revision (published)