title: Double Factorial 1
signature: doubleFactorial1(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          24, 
          1961990553600)
      }");
  
      print("TEST-1...${driver(
          3, 
          3)
      }");
  
      print("TEST-2...${driver(
          22, 
          81749606400)
      }");
  
      print("TEST-3...${driver(
          2, 
          2)
      }");
  
      print("TEST-4...${driver(
          30, 
          42849873690624000)
      }");
  
      print("TEST-5...${driver(
          2, 
          2)
      }");
  
      return 0;
  }
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;
    }
  }