title: Double Factorial 1
signature: pub fn double_factorial_1(n: i32) -> i64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i64, expected: i64)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        24, 
        1961990553600
      ));
      
      println!("TEST-1...{}", driver(
        3, 
        3
      ));
      
      println!("TEST-2...{}", driver(
        22, 
        81749606400
      ));
      
      println!("TEST-3...{}", driver(
        2, 
        2
      ));
      
      println!("TEST-4...{}", driver(
        30, 
        42849873690624000
      ));
      
      println!("TEST-5...{}", driver(
        2, 
        2
      ));
      
  }
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;
    }
  }