title: Double Factorial
signature: fun doubleFactorial(n: Int): Long {
source_py: def double_factorial(n):
      if ((n == 0) or (n == 1)):
          return 1
      return (n * double_factorial((n - 2)))
source_cpp: unsigned int double_factorial(unsigned int n) {
    if ( n == 0 || n == 1 ) return 1;
    return n * double_factorial ( n - 2 );
  }
question_info.test_list: [{"idx": 0, "outputs": 2027025, "inputs": {"n": 15}}, {"idx": 1, "outputs": 13749310575, "inputs": {"n": 21}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(15, 2027025)
      println("TEST-0...${result}")
      
      result = driver(21, 13749310575)
      println("TEST-1...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: doubleFactorial
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn