title: Compute N Under Modulo P
signature: function computeNUnderModuloP($n, $p) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $p, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n, $p), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        85, 18, 
        0));
      
      printf("TEST-1...%s\n",driver(
        14, 13, 
        0));
      
      printf("TEST-2...%s\n",driver(
        83, 21, 
        0));
      
      printf("TEST-3...%s\n",driver(
        30, 35, 
        0));
      
      printf("TEST-4...%s\n",driver(
        96, 51, 
        0));
      
      printf("TEST-5...%s\n",driver(
        55, 58, 
        0));
      
      printf("TEST-6...%s\n",driver(
        82, 71, 
        0));
      
      printf("TEST-7...%s\n",driver(
        12, 74, 
        44));
      
      printf("TEST-8...%s\n",driver(
        38, 3, 
        0));
      
      printf("TEST-9...%s\n",driver(
        46, 73, 
        67));
      
  }
  
  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;
  }