Skip to content

Latest commit

 

History

History

Compute nCr mod p

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Given three numbers n, r and p, compute value of nCr mod p.

Example:

Input: n = 10, r = 2, p = 13

Output: 6

Explanation: 10C2 is 45 and 45 % 13 is 6.