input: Write a python function to calculate the value of nCr % p.
  assert ncr_modulus(10,2,13)==6
  assert ncr_modulus(15,12,43)==25
  assert ncr_modulus(17,9,18)==10
output: def ncr_modulus(n, r, p):
      if r > n:
          return 0
      num = den = 1
      for i in range(r):
          num = num * (n - i) % p
          den = den * (i + 1) % p
      return num * pow(den, p - 2, p) % p