input: Write a function to find the result of nCr modulo p.
  assert ncr_modp(10,2,13)==6
  assert ncr_modp(15,12,43)==25
  assert ncr_modp(17,9,18)==10
output: def ncr_modp(n, r, p):
      if r > n - r:
          r = n - r
      C = [0] * (r + 1)
      C[0] = 1
      for i in range(1, n + 1):
          j = min(i, r)
          while j > 0:
              C[j] = (C[j] + C[j - 1]) % p
              j -= 1
      return C[r]