title: Double Factorial 1
signature: double_factorial_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          24L, 
          1961990553600L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          3L, 
          3L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          22L, 
          81749606400L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          2L, 
          2L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          30L, 
          42849873690624000L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          2L, 
          2L
      )))
  
  }
  
  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;
    }
  }