title: Double Factorial 1
signature: function double_factorial_1(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(24, 1961990553600);
      @printf("TEST-0...%s\n",result);
      
      result = driver(3, 3);
      @printf("TEST-1...%s\n",result);
      
      result = driver(22, 81749606400);
      @printf("TEST-2...%s\n",result);
      
      result = driver(2, 2);
      @printf("TEST-3...%s\n",result);
      
      result = driver(30, 42849873690624000);
      @printf("TEST-4...%s\n",result);
      
      result = driver(2, 2);
      @printf("TEST-5...%s\n",result);
      
  end
  
  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;
    }
  }