title: Double Factorial 1
signature: def doubleFactorial1(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Long , expected: Long): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Long): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        24, 
        1961990553600L    
      )}")   
  
  
      println(s"TEST-1...${driver(
        3, 
        3L    
      )}")   
  
  
      println(s"TEST-2...${driver(
        22, 
        81749606400L    
      )}")   
  
  
      println(s"TEST-3...${driver(
        2, 
        2L    
      )}")   
  
  
      println(s"TEST-4...${driver(
        30, 
        42849873690624000L    
      )}")   
  
  
      println(s"TEST-5...${driver(
        2, 
        2L    
      )}")   
  
  }
  
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;
    }
  }