title: Compute N Under Modulo P
signature: compute_n_under_modulo_p <- function(n, p) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, p, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, p), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          85L, 18L, 
          0L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          14L, 13L, 
          0L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          83L, 21L, 
          0L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          30L, 35L, 
          0L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          96L, 51L, 
          0L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          55L, 58L, 
          0L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          82L, 71L, 
          0L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          12L, 74L, 
          44L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          38L, 3L, 
          0L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          46L, 73L, 
          67L
      )))
  
  }
  
  main()
source_py: def compute_n_under_modulo_p(n, p):
      if (n >= p):
          return 0
      result = 1
      for i in range(1, (n + 1)):
          result = ((result * i) % p)
      return result
source_cpp: int compute_n_under_modulo_p(int n, int p) {
    if ( n >= p ) return 0;
    int result = 1;
    for ( int i = 1;
    i <= n;
    i ++ ) result = ( result * i ) % p;
    return result;
  }