title: Double Factorial 1
signature: function doubleFactorial1($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        24, 
        1961990553600));
      
      printf("TEST-1...%s\n",driver(
        3, 
        3));
      
      printf("TEST-2...%s\n",driver(
        22, 
        81749606400));
      
      printf("TEST-3...%s\n",driver(
        2, 
        2));
      
      printf("TEST-4...%s\n",driver(
        30, 
        42849873690624000));
      
      printf("TEST-5...%s\n",driver(
        2, 
        2));
      
  }
  
  main();
  ?>
source_py: def double_factorial_1(n):
      res = 1
      for i in range(n, (- 1), (- 2)):
          if ((i == 0) or (i == 1)):
              return res
          else:
              res *= i
source_cpp: unsigned int double_factorial_1(unsigned int n) {
    int res = 1;
    for ( int i = n;
    i >= 0;
    i = i - 2 ) {
      if ( i == 0 || i == 1 ) return res;
      else res *= i;
    }
  }